@@ -29,21 +29,8 @@ add('crontab:jobs', [
29
29
30
30
## Configuration
31
31
### 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#L30 )
33
33
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
- ```
47
34
Get path to bin
48
35
49
36
``` php title="Default value"
@@ -52,7 +39,7 @@ return which('crontab');
52
39
53
40
54
41
### 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#L35 )
56
43
57
44
Set the identifier used in the crontab, application name by default
58
45
@@ -62,7 +49,7 @@ return get('application', 'application');
62
49
63
50
64
51
### 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#L40 )
66
53
67
54
Use sudo to run crontab. When running crontab with sudo, you can use the ` -u ` parameter to change a crontab for a different user.
68
55
@@ -75,15 +62,15 @@ false
75
62
## Tasks
76
63
77
64
### crontab\: sync {#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#L43 )
79
66
80
67
Sync crontab jobs.
81
68
82
69
83
70
84
71
85
72
### crontab\: remove {#crontab-remove}
86
- [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L85 )
73
+ [ Source] ( https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L87 )
87
74
88
75
Remove crontab jobs.
89
76
0 commit comments