apache recurrent tasks
Hi guys,
Im running php and apache and Id like to designate a php script to run once a day. How do I go about setting this up?
Thanks
-CProgrammer
There's no way to do this through just PHP and Apache that I know of (Doesn't mean there isn't a way of course). What OS are you running? There might be an OS-specific way to do this.
I'd also be interested in knowing if this is possible (under Windows preferably). I could write an app that would access a particular web page every so often, but if there's a better way I'd be glad to hear it...
I'd also be interested in knowing if this is possible (under Windows preferably). I could write an app that would access a particular web page every so often, but if there's a better way I'd be glad to hear it...
Hey thanks for your reply.
Well im running SUSE Linux Enterprise Server and if anyone knows of a built in feature here that would be great.
The only alternative I can think of is that I have a script run on every page request which checks against a date in a database and then performs the once a day routine if this hasnt been done yet. Offcourse this means I have a database access on every single request to the server which is just not pretty, not the end of the world, but there has to be a etter way.
What you said gave me the idea of making a program that always runs and once a day simply sends a request to the php script. This would work but its also ugly.
Well im running SUSE Linux Enterprise Server and if anyone knows of a built in feature here that would be great.
The only alternative I can think of is that I have a script run on every page request which checks against a date in a database and then performs the once a day routine if this hasnt been done yet. Offcourse this means I have a database access on every single request to the server which is just not pretty, not the end of the world, but there has to be a etter way.
What you said gave me the idea of making a program that always runs and once a day simply sends a request to the php script. This would work but its also ugly.
Look at cron, or a php simulated cron which is what you are describing.
Php scripts can be run from the command line and also directly from cron.
Php scripts can be run from the command line and also directly from cron.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement