Re: Crontab PHP Script

From: Date: Sun, 27 Jun 2004 05:16:54 +0000
Subject: Re: Crontab PHP Script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-189112@lists.php.net to get a copy of this message
Not sure if this is different in linux, but usually the first parameter is the minutes, and if you had 01 in it, that means that it would do it once an hour (i.e. 12:01, 1:01, 2:01, etc... They should all have stars to do it once a minute. In freeBSD, it would look like this :
*       *       *       *       root    /usr/local/bin/php home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php
Tim. At 04:34 PM 6/26/2004, Ryan Schefke wrote:
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
SimpleNet's Back ! http://www.simplenet.com

« previous php.general (#189112) next »