Crontab PHP Script
| From: | Ryan Schefke | Date: | Sat, 26 Jun 2004 23:34:11 +0000 |
| Subject: | Crontab PHP Script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-189107@lists.php.net to get a copy of this message | ||
Hi,
Can someone please give me some guidance. I'd like to run a php script
every minute (in reality every night, but just testing). I've done some
reading and found that a crontab is the best way to go (I think). I'm using
Plesk 7 on a Linux box and I have root access.
I made a quick php script called crontab.php to email me.
==============================================================
<?php //send email on domain
/* subject */
$str_subject = "crontab test";
/* message */
$messagecontent = "this is a test to see
if crontab working nightly\n\n";
/* to */
$to = "ryan@triomfgroup.com";
/* from */
$headers .= "From: tgWedding
<development@triomfgroup.com>\r\n";
/* bcc */
// $headers .= "Bcc:
development@triomfgroup.com\r\n";
mail($to, $str_subject, $messagecontent,
$headers);
?>
Then I setup my crontab command as:
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php
<https://217.160.251.56:8443/sysuser/crontab_edit.php?cte_src=CTEJKgkqCSoJKg
kvaG9tZS9odHRwZC92aG9zdHMvdGd3ZWRkaW5nLmNvbS9odHRwZG9jcy90Z3dlZGRpbmcvY3Jvbn
RhYi5waHA=>
I used " * " for every field except M, which I set to " 01 " to run every
minute.
It's not working...can someone guide me along and let me know what I've done
wrong.
Thanks,
Ryan