diff --git a/docs/en/README.md b/docs/en/README.md index 05373973..d324b003 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -6,9 +6,9 @@ Getting Started * [Installing PHP Censor](installing.md) * [Adding a Virtual Host](virtual_host.md) - * [Run Builds Using a Worker](workers/worker.md) - * [Run Builds Using a Daemon](workers/daemon.md) - * [Run Builds Using Cron](workers/cron.md) + * [Run builds using a worker](workers/worker.md) + * [Run builds using a daemon](workers/daemon.md) + * [Run builds using cronjob](workers/cron.md) * [Adding PHP Censor Support to Your Projects](config.md) * [Setting up Logging](logging.md) * [Updating PHP Censor](updating.md) diff --git a/docs/en/workers/cron.md b/docs/en/workers/cron.md index a8e03c9f..cc128a91 100644 --- a/docs/en/workers/cron.md +++ b/docs/en/workers/cron.md @@ -1,9 +1,9 @@ -Run Builds Using Cron -===================== +Run builds using cronjob +======================== Running builds using cron is a quick and simple method of getting up and running with PHP Censor. It also removes the need for PHP Censor to be running all the time. -If you want a little more control over how PHP Censor runs, you may want to [set up the PHP Censor daemon](workers/daemon.md) instead. +If you want a little more control over how PHP Censor runs, you may want to [set up the daemon](workers/daemon.md) instead. Setting up the Cron Job ----------------------- @@ -11,7 +11,17 @@ Setting up the Cron Job You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following: ```sh -* * * * * /usr/bin/php /path/to/php-censor/bin/console php-censor:run-builds +SHELL=/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +* * * * * /path/to/php-censor/bin/console php-censor:run-builds ``` -**Note:** Make sure you change the `/path/to/php-censor` to the directory in which you installed PHP Censor, and update the PHP path if necessary. +And for one running worker: + +```sh +SHELL=/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +* * * * * flock -n /tmp/run-builds.lock --command '/path/to/php-censor/bin/console php-censor:run-builds' +``` diff --git a/docs/en/workers/daemon.md b/docs/en/workers/daemon.md index dd719bd1..cef79a71 100644 --- a/docs/en/workers/daemon.md +++ b/docs/en/workers/daemon.md @@ -1,11 +1,11 @@ -Run Builds Using a Daemon +Run builds using a daemon ========================= The PHP Censor daemon runs in the background on your server and continuously checks for new builds. Unless already running a build, the daemon should pick up and start running new builds within seconds of being created. The daemon is also useful if you want to run multiple PHP Censor workers in a virtualised environment (i.e. Docker) -If you want to run PHP Censor builds on a regular schedule instead, you should [set up a cron-job](workers/cron.md). +If you want to run PHP Censor builds on a regular schedule instead, you should [set up a cronjob](workers/cron.md). Starting the Daemon ------------------- diff --git a/docs/en/workers/worker.md b/docs/en/workers/worker.md index 9badeb8e..1270a717 100644 --- a/docs/en/workers/worker.md +++ b/docs/en/workers/worker.md @@ -1,4 +1,4 @@ -Run Builds Using a Worker +Run builds using a worker ========================= The PHP Censor Worker runs in the background on your server and waits for new builds to be added to a Beanstalkd queue. Unless already running a build, the worker will pick up and start running new builds almost immediately after their creation.