Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crontab

Status
Not open for further replies.

namida

Programmer
Joined
May 29, 2003
Messages
101
Location
AU
Hi

I've searched php documentation and can only find a bit of how to create crontab in
and I don't understand the code.
It's
$file="/etc/test.cron"; #contains the cronjobs like
0 * * * * php -f /usr/local/httpd/htdocs/php/mail.php /dev/null 2>&1

system("crontab $file 2>&1"); #set file into crontab
system("crontab -r 2>&1"); #register actual crontab

Basically can anyone explain to me how to make a crontab / automatic execution of SQL statements?
 
I saw the faq about crontab

so the file test.cron just contain one line which is
0 6 * * * TERM=xterm; export TERM; /usr/bin/lynx -source " 1>/dev/null 2>&1 ???

how long will the script actually run?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top