Code Monkey home page Code Monkey logo

qhezbatchcron's Introduction

QH eZ Publish Batch Cron
===========================

If you have multiple sites running on eZ Publish, your crontab configuration can get really big. This CLI script allows more compact crontab by configuring all your websites in a config file.

You can define common commands to be ran, each website can add extra command or skip one ore more common ones.

You can define the same or several different user to sudo to before running the commands, recent eZ Publish don't allow the root user to run some scripts.

Then to setup your crontab:
# eZ Publish websites maintenance cronjobs
##########################################
SCRIPTROOT=/var/lib/ezpublish/cronjobs/

# Location of the PHP Command Line Interface binary.
PHP=/usr/bin/php

# Instruct cron to run the main set of cronjobs
# every day
35 6 * * * cd $SCRIPTROOT && $PHP runezcronjobs.php generic 2>&1
05 4 * * * cd $SCRIPTROOT && $PHP runezcronjobs.php expired_session 2>&1

# Instruct cron to run the "infrequent" set of cronjobs
# every Monday
20 5 * * 1 cd $SCRIPTROOT && $PHP runezcronjobs.php infrequent 2>&1

# Re-launch precompile script every week
20 5 * * 6 cd $SCRIPTROOT && $PHP runezcronjobs.php eztc 2>&1

# Instruct cron to run the "frequent" set of cronjobs
# every 15 minutes
0,15,30,45 * * * * cd $SCRIPTROOT && $PHP runezcronjobs.php frequent 2>&1

# eZ Flow cronjobs
*/10 * * * * cd $SCRIPTROOT && $PHP runezcronjobs.php ezflow 2>&1
*/10 * * * * cd $SCRIPTROOT && $PHP runezcronjobs.php runscheduledscripts 2>&1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.