File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 merge_group :
55 push :
66 branches :
7- - main
87 - release
98 paths-ignore :
109 - ' **.md'
1110 pull_request :
1211 branches :
13- - main
1412 - release
1513 paths-ignore :
1614 - ' **.md'
Original file line number Diff line number Diff line change 1212
1313Easiest way is via composer. Just run ` composer require codenamephp/deployer.crontab ` in your cli which should install the latest version for you.
1414
15- ## Usage
15+ ## Usage
16+
17+ Just install the package and use the task in your deploy.php, e.g:
18+
19+ ``` php
20+
21+ $deployerFunctions = new \de\codenamephp\deployer\base\functions\All();
22+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Install()); //expects file in {{release_or_current_path}}/crontab -> crontab {{release_or_current_path}}/crontab
23+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Install('path/to/file')); // crontab path/to/file
24+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Install('path/to/file', 'deployerUser')); // crontab -u deployerUser path/to/file
25+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Show()); // crontab -l
26+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Show('deployerUser')); // crontab -u deployerUser -l
27+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Delete()); // crontab -r
28+ $deployerFunctions->registerTask(new \de\codenamephp\deployer\crontab\Task\Delete('deployerUser')); // crontab -u deployerUser -r
29+ ```
30+ ` vendor/bin/dep crontab:install `
31+ ` vendor/bin/dep crontab:show `
32+ ` vendor/bin/dep crontab:delete `
You can’t perform that action at this time.
0 commit comments