954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Automatic execution of php

Hello,
Is it possible to write a php script and have it automatically excecute at a certain time everyday? I need to write a script that will do garbage collection on my database everyday. I do not have a whole lot of power over the hosting server and I can't upload a java program or write a shell script to do this. Many thanks in advance.

ryy705
Junior Poster
171 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

I'd probably run it as a scheduled task on windows.

For linux do man cron

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

what i like to do is put some ajax on the main page of my website so that the php code will execute every time someone accesses your page and do the garbage collection you need. i don't know if this would work for you but i works quite well for me.

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You