File: example.php

Recommend this page to a friend!
  Classes of Yousaf Syed  >  PHP Task Runner  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Task Runner
Run periodic tasks after a interval since last run
Author: By
Last change:
Date: 5 years ago
Size: 355 bytes
 

Contents

Class file image Download
<?php
require 'TaskRunner.php';

$task = new TaskRunner();
$task->config(array(
       
'syncInterval'=>1,
       
'taskName'=>'MyTask'
));

$task->run(function(){
   
#Your Task Here;
   
echo "Task Ran";
});

$task2 = new TaskRunner();
$task2->config(array(
       
'syncInterval'=>1,
       
'taskName'=>'MyTask2'
));
$task2->run(function(){
   
#Your Task Here;
   
echo "Task2 Ran";
});


For more information send a message to info at phpclasses dot org.