User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,547 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,353 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 689 | Replies: 2
Reply
Join Date: Jul 2006
Posts: 112
Reputation: ryy705 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
ryy705 ryy705 is offline Offline
Junior Poster

Question Automatic execution of php

  #1  
Oct 20th, 2007
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.
Last edited by ryy705 : Oct 20th, 2007 at 1:07 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,832
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 324
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: Automatic execution of php

  #2  
Oct 20th, 2007
I'd probably run it as a scheduled task on windows.

For linux do man cron
... the hat of 'is this a cat in a hat?'
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is online now Online
Practically a Master Poster

Re: Automatic execution of php

  #3  
Oct 20th, 2007
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC