Location: PHPKode > scripts > Virtual Cron > virtual-cron/example.php
<?php
require_once("virtualcron.php");
$cron=new virtualcron(1,"virtualcron.txt"); // 1=minutes to delay action, virtualcron.txt=contol file
print "Testing virtualcron php class<br />";
	if ($cron->allowAction()) print "If this was a script function it would be executed now (".date ("F d Y H:i:s",$cron->lastExec).")! Next allowed execution at ".date ("F d Y H:i:s",$cron->nextExec)." (in ".$cron->secToExec." seconds). Reload the page to check";
	else print "If this was a script function it would NOT have been executed! Next execution is allowed in ".$cron->secToExec." seconds. Reload the page to check";
?>
Return current item: Virtual Cron