@@ -29,21 +29,8 @@ add('crontab:jobs', [
2929
3030## Configuration
3131### bin/crontab
32- [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L28 )
32+ [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L31 )
3333
34- Recipe for adding crontab jobs.
35- This recipe creates a new section in the crontab file with the configured jobs.
36- The section is identified by the * crontab: identifier * variable, by default the application name.
37- ## Configuration
38- - * crontab: jobs * - An array of strings with crontab lines.
39- ## Usage
40- ``` php
41- require 'contrib/crontab.php';
42- after('deploy:success', 'crontab:sync');
43- add('crontab:jobs', [
44- '* * * * * cd {{current_path}} && {{bin/php}} artisan schedule:run >> /dev/null 2>&1',
45- ]);
46- ```
4734Get path to bin
4835
4936``` php title="Default value"
@@ -52,7 +39,7 @@ return which('crontab');
5239
5340
5441### crontab: identifier
55- [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L33 )
42+ [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L36 )
5643
5744Set the identifier used in the crontab, application name by default
5845
@@ -62,7 +49,7 @@ return get('application', 'application');
6249
6350
6451### crontab: use_sudo
65- [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L38 )
52+ [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L41 )
6653
6754Use sudo to run crontab. When running crontab with sudo, you can use the ` -u ` parameter to change a crontab for a different user.
6855
7562## Tasks
7663
7764### crontab: sync
78- [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L41 )
65+ [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L44 )
7966
8067Sync crontab jobs.
8168
0 commit comments