Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * A demo cronjob to illustrate its usage. A starting date can be set, along
- * with a few interval types in days, hours, or minutes. A timeout variable
- * can also be set to ensure that a cronjob will not be running twice. Best
- * practice would be to keep the time under the interval, but certain
- * circumstances might arise where the timeout exceeds the interval.
- *
- * @author Stefan van Beusekom
- * @version 1.0
- */
- class Callcenter_Model_Cron_Demo extends Callcenter_Model_Cron_Abstract {
- const CRON_START_DATETIME = "2012-11-14 12:00:00";
- const CRON_INTERVAL_DAYS = 0;
- const CRON_INTERVAL_HOURS = 0;
- const CRON_INTERVAL_MINUTES = 1;
- const CRON_TIMEOUT_MINUTES = 0;
- const CRON_TIMEOUT_SECONDS = 5;
- const CRON_PRIORITY = 1;
- const CRON_ACTIVE = false;
- /**
- * This method contains the actual code you wish for the cron job to
- * execute while you run it. This can vary from XML creation to updating
- * a product listing. Use this example to create your own cron job class.
- *
- * @author Stefan van Beusekom
- * @since 1.0
- */
- protected function task() {
- // An example of an error occurring in your own code, and how to handle it.
- //$this->addError("A horrible test error has occurred, call the cops!");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment