php-censor/docs/en/workers/cron.md

18 lines
740 B
Markdown
Raw Normal View History

2016-07-19 11:12:28 +02:00
Run Builds Using Cron
2017-01-04 13:22:20 +01:00
=====================
2016-07-19 11:12:28 +02:00
2016-07-19 13:05:02 +02:00
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.
2016-07-17 16:20:35 +02:00
2016-07-19 13:05:02 +02:00
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.
2016-07-17 16:20:35 +02:00
2016-07-19 11:12:28 +02:00
Setting up the Cron Job
2017-01-04 13:22:20 +01:00
-----------------------
2016-07-17 16:20:35 +02:00
2016-07-19 13:05:02 +02:00
You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following:
2016-07-17 16:20:35 +02:00
```sh
* * * * * /usr/bin/php /path/to/php-censor/bin/console php-censor:run-builds
2016-07-17 16:20:35 +02:00
```
2016-07-21 19:02:11 +02:00
**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.