Re: Fw: [PHP] Re: Executing CLI scripts as a cron

From: Date: Thu, 15 May 2003 21:26:52 +0000
Subject: Re: Fw: [PHP] Re: Executing CLI scripts as a cron
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147819@lists.php.net to get a copy of this message
Instead of adding #!/usr/bin/php to the top of the script that executes the other scripts, put: #!/bin/sh /usr/local/bin/php -f /path/to/file /usr/local/bin/php -f /path/to/file /usr/local/bin/php -f /path/to/file And make that your entire file, replacing the /path/to/file with the correct path. On Thu, 2003-05-15 at 17:25, Ron Dyck wrote: > TrafficReports is the file with the 3 lines below in it. The purpose is to > run several scripts without having to add them individually to the cron. > > I've tried adding #!/usr/bin/php to the beginning of the file with no > success. I've successfully created crons that run php scripts, just never > several at once. > > ron > > > > Try putting > > > > #!/usr/bin/php in the script and calling it directly. > > > > Also, is it TrafficReports or TrafficReport, your cron is different than > the > > file from what I can see below. > > > > Make sure you have the permission to run the script, so root doesnt own > the > > scripts when your cron is only setup under user "joe bloggs". > > > > jim. > > > > > > "Ron Dyck" <adam@webbtech.net> wrote in message > > news:006501c31b22$3433bdb0$8c02a8c0@webbtech... > > > I'm trying to execute multiple php CLI scripts from a cron tab. I've > > create > > > a file with something like the following in it: > > > > > > /usr/local/bin/php -f '/http/www/site1/sh_scripts/TrafficReport' > > > /usr/local/bin/php -f '/http/www/site2/sh_scripts/TrafficReport' > > > /usr/local/bin/php -f '/http/www/site3/sh_scripts/TrafficReport' > > > > > > The file is called: TrafficReports. > > > > > > When I run it from the command line, it works fine, but when I > attemptphp > to > > do > > > it with a schedule cron tab, no luck. > > > > > > Any thoughts. > > > > > > > > > ============================== > > > Ron Dyck > > > Webbtech.net > > > ============================== > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- Adam Voigt (adam@cryptocomm.com) Linux/Unix Network Administrator The Cryptocomm Group

« previous php.general (#147819) next »