Jump to content
  • Advertisement
Sign in to follow this  
CProgrammer

apache recurrent tasks

This topic is 3597 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!