docs/contrib/crontab.md
require 'contrib/crontab.php';
Recipe for adding crontab jobs. This recipe creates a new section in the crontab file with the configured jobs. The section is identified by the crontab:identifier variable, by default the application name.
require 'contrib/crontab.php';
after('deploy:success', 'crontab:sync');
add('crontab:jobs', [
'* * * * * cd {{current_path}} && {{bin/php}} artisan schedule:run >> /dev/null 2>&1',
]);
Recipe for adding crontab jobs. This recipe creates a new section in the crontab file with the configured jobs. The section is identified by the crontab:identifier variable, by default the application name.
require 'contrib/crontab.php';
after('deploy:success', 'crontab:sync');
add('crontab:jobs', [
'* * * * * cd {{current_path}} && {{bin/php}} artisan schedule:run >> /dev/null 2>&1',
]);
Get path to bin
return which('crontab');
Set the identifier used in the crontab, application name by default
return get('application', 'application');
Use sudo to run crontab. When running crontab with sudo, you can use the -u parameter to change a crontab for a different user.
false
Sync crontab jobs.
Remove crontab jobs.