hgg / crond
Manage crontab files in /etc/cron.d
v1.2.0
2013-04-03 19:31 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2024-11-09 14:09:16 UTC
README
Simple library for managing small crontab files in /etc/cron.d.
Installation
Using Composer:
{ "require": { "hglattergotz/crond": "*" } }
Usage
<?php use HGG\Crond\Job; use HGG\Crond\Crond; $job = new Job(); $job->setUser('root'); $job->setCmd('/path/to/do/something/awesome'); $job->setTime('0 * * * *'); $job->setFileName('myCronJob'); $cron = new Crond(); $cron->install($job);
The above will install the cron job
0 * * * * root /path/to/do/something/awesome
in a file located at
/etc/cron.d/myCronJob