codenamephp / deployer.crontab
Installs: 5 862
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- codenamephp/deployer.base: ^3.0
- codenamephp/deployer.command: ^1.0
Requires (Dev)
- mockery/mockery: ^1.5
This package is auto-updated.
Last update: 2025-01-23 02:14:02 UTC
README
Installation
Easiest way is via composer. Just run composer require codenamephp/deployer.crontab
in your cli which should install the latest version for you.
Usage
Just install the package and use the task in your deploy.php, e.g:
$deployerFunctions = new \de\codenamephp\deployer\base\functions\All(); $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Install()); //expects file in {{release_or_current_path}}/crontab -> crontab {{release_or_current_path}}/crontab $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Install('path/to/file')); // crontab path/to/file $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Install('path/to/file', 'deployerUser')); // crontab -u deployerUser path/to/file $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Show()); // crontab -l $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Show('deployerUser')); // crontab -u deployerUser -l $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Delete()); // crontab -r $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Delete('deployerUser')); // crontab -u deployerUser -r
vendor/bin/dep crontab:install
vendor/bin/dep crontab:show
vendor/bin/dep crontab:delete