Skip to content

Instantly share code, notes, and snippets.

@cardil
Created April 10, 2012 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cardil/2355211 to your computer and use it in GitHub Desktop.
Save cardil/2355211 to your computer and use it in GitHub Desktop.
CrontabManager simple example
<?php
use php\manager\crontab\CrontabManager;
$crontab = new CrontabManager();
$job = $crontab->newJob();
$job->on('* * * * *');
$job->onMinute('20-30')->doJob("echo foo;");
$crontab->add($job);
$job->onMinute('35-40')->doJob("echo bar;");
$crontab->add($job);
$crontab->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment