Guest User

Untitled

a guest
Nov 14th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * A demo cronjob to illustrate its usage. A starting date can be set, along
  5.  * with a few interval types in days, hours, or minutes. A timeout variable
  6.  * can also be set to ensure that a cronjob will not be running twice. Best
  7.  * practice would be to keep the time under the interval, but certain
  8.  * circumstances might arise where the timeout exceeds the interval.
  9.  *
  10.  * @author Stefan van Beusekom
  11.  * @version 1.0
  12.  */
  13. class Callcenter_Model_Cron_Demo extends Callcenter_Model_Cron_Abstract {
  14.  
  15.     const CRON_START_DATETIME = "2012-11-14 12:00:00";
  16.     const CRON_INTERVAL_DAYS = 0;
  17.     const CRON_INTERVAL_HOURS = 0;
  18.     const CRON_INTERVAL_MINUTES = 1;
  19.     const CRON_TIMEOUT_MINUTES = 0;
  20.     const CRON_TIMEOUT_SECONDS = 5;
  21.     const CRON_PRIORITY = 1;
  22.     const CRON_ACTIVE = false;
  23.  
  24.     /**
  25.      * This method contains the actual code you wish for the cron job to
  26.      * execute while you run it. This can vary from XML creation to updating
  27.      * a product listing. Use this example to create your own cron job class.
  28.      *
  29.      * @author Stefan van Beusekom
  30.      * @since 1.0
  31.      */
  32.     protected function task() {
  33.         // An example of an error occurring in your own code, and how to handle it.
  34.         //$this->addError("A horrible test error has occurred, call the cops!");
  35.     }
  36.  
  37. }
  38.  
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment