• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Cronjob Help

WebWatcher

New Member
Can somebody show me how I could set up a cronjob to run a particular script every friday night at 7pm

Thanks in advance
 
you wouldn't ...

PHP:
<?php
/** delcare a function to execute **/
/** in your case **/
/** probably include() a file **/
function lengthy_process( )
{
	for( $i = 0; $i < 10000; $i++ )
	{
		continue ;
	}
}
/** continue forever **/
do
{
	/** execute operation **/
	lengthy_process( );
	/** sleep for 0.1 seconds inbetween ending of **/
	/** execution and beginning the next **/
	usleep( 100000 );
}
while( true );
?>

Code:
nohup nice php script.php &

will execute forever untill you kill with

Code:
kill procid

you can discover procid by

Code:
ps aux | grep script.php

assumes code is named script.php ...

If you don't have that level of access, the best you can do is every minute, of every hour, of every week, of every month ...
 
Back
Top