Re: Running a PHP script everyday
| From: | Miles Thompson | Date: | Sun, 31 Jul 2005 00:59:38 +0000 |
| Subject: | Re: Running a PHP script everyday | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219703@lists.php.net to get a copy of this message | ||
That's not lame, it's just Windows version of cron. You can also set it up using "at" from the console, but it still shows up in Task Manager.
M.
At 04:03 PM 7/30/2005, M Saleh EG wrote:
If you're on windows desktop.... try this... it might sound a lil lame but it works. Schedule a task to open IE or FF and pass a url to the task . That's it. The task will execute that page in a given interval. On 7/30/05, Rory Browne <rory.browne@gmail.com> wrote: If your script needs to be run by the webserver - if for some reason cli won´t work for you, then you could always automate a call to the webserver using wget. You can get wget for win32 as well as Unix/Linux, so you shouldn´t have any problems here. On 7/30/05, André Medeiros <andre.caum@gmail.com> wrote:You can "cron" the script to run. Do the following: 1) Add #!/usr/bin/php as the first line on your .php file. If /usr/bin/php isn't where your php binary lives, type "whereis php" to find out 2) Make sure you chmod +x your php script. 3) http://www.linuxforums.org/tutorials/1/tutorial-4017.html On 7/30/05, sub@pudlz.com <sub@pudlz.com> wrote:will be figuring that out today probably.In my pevious hunt through cron I didn't even notice the PHP CLI. So Iask.My server runs on Linux. Not sure which distro though. I'll have tothem a pic of the day. I got the HTML MimeMail 2.5.1 to work perfectly, now I just need to figure out how to make it run without me doing anything.My script will be getting e-mail addresses from my SQL db and sendingcurrentlyThanks! Andrew Darrow Kronos1 Productions www.pudlz.com <http://www.pudlz.com> ----- Original Message ----- From: "James Kaufman" <jmk@kaufman.eden-prairie.mn.us> To: <php-general@lists.php.net> Sent: Saturday, July 30, 2005 10:07 AM Subject: Re: [PHP] Running a PHP script everydayOn Sat, Jul 30, 2005 at 09:17:20AM -0700, sub@pudlz.com wrote:I have a PHP script that I need to run once a day. I have itsomethingsetup so that I just run it from my cell phone, but I would preferit's forautomated. I'd looked into a cron job, but that just looks likestatementdoing linux command line stuff on my host. I also thought about writing a never ending while loop with an iftime, itthat checks to see if it's time to run the script, then when it isa PHPruns. Then checks to see if it's time again. But even assuming I could get it working, do I really want to havethe CPU onscript that runs all the time. This could be bad if it ate up allprocess once Imy server. I'm not even sure I have access rights to kill thecron understart it. Any suggestions? Andrew Darrow Kronos1 Productions www.pudlz.com <http://www.pudlz.com>You don't state what OS you are using, but you certainly can usescript do?Linux to run a PHP script. What really matters is what does the PHPretrieves dataFor example, I have a PHP script that I run periodically thatscript do?from a database and updates a text file on the disk. What does your7/28/2005-- Jim Kaufman Linux Evangelist public key 0x6D802619 CCNA, CISSP# 65668 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date:-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- M.Saleh.E.G 97150-4779817-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php