RE: [PHP] Running PHP as a cron job....

From: Date: Sun, 08 Jul 2001 22:51:46 +0000
Subject: RE: [PHP] Running PHP as a cron job....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56827@lists.php.net to get a copy of this message
Make sure you also give the path to perl/php. Below is my cron job, it needs to know the path of the interpreter. /usr/bin/php /home/user/public_html/test.php Jeff > -----Original Message----- > From: Ben Bleything [mailto:bleythbe@mailbox.orst.edu] > Sent: Sunday, July 08, 2001 6:34 PM > To: 'James, Yz'; php-general@lists.php.net > Subject: RE: [PHP] Running PHP as a cron job.... > > > How are you executing the script? Does it come by and run 'php > yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in > it? I've found that works well... just put that as the first line, and > it behaves as a shell script (after you make it executable, of course) > > Ben > > -----Original Message----- > From: James, Yz [mailto:liljim@btconnect.com] > Sent: Sunday, July 08, 2001 3:39 PM > To: php-general@lists.php.net > Subject: [PHP] Running PHP as a cron job.... > > Hi all, > > This is probably going to sound incoherant, but.... > > Do I have to do anything (other than change the permissions of a php > file) > to get it to run as part of a cron job? I created an extremely simple > file > that should just send a blank email to me (using mail()). I got an > email > from the cron daemon saying, "bad token", or something like that, yet > when > executed through a browser, the script behaves as it should. > > Do I have to write the php scripts differently to how I would if they > were > to be displayed in a browser? > > Neeed...Sleeeep.... ;) > > Cheers, > James. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#56827) next »