deployer/docs/contrib/crontab.md
Jesko Karwasz@portavice e518a423fb
Crontab: allow sudo with crontab:use_sudo option (#3759)
* Add parameter crontab:use_sudo to allow running crontab using sudo.

This makes it possible to overwrite the bin/crontab variable to edit crontab for other users.

e.g.

set("crontab:use_sudo", true);
set("bin/crontab", function () {
  return which('crontab') . " -u www-data";
});

* Add documentation and use cases for crontab:use_sudo

* Regenerate documentation with docgen
2023-12-22 10:13:44 +01:00

1.0 KiB

Crontab Recipe

require 'contrib/crontab.php';

Source

Configuration

bin/crontab

Source

Get path to bin

return which('crontab');

crontab:identifier

Source

Set the identifier used in the crontab, application name by default

return get('application', 'application');

crontab:use_sudo

Source

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

Tasks

crontab:sync

Source

Sync crontab jobs.