W WebWatcher New Member Jan 18, 2008 #1 Can somebody show me how I could set up a cronjob to run a particular script every friday night at 7pm Thanks in advance
Can somebody show me how I could set up a cronjob to run a particular script every friday night at 7pm Thanks in advance
krakjoe stop staring NLC Jan 20, 2008 #4 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 ...
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 ...