n14charlie Posted July 22, 2009 Share Posted July 22, 2009 Hello I need a php script on a server to run every end of an hour. The only thing I was able to find about how to do this is called "Cron Jobs" which is a feature of the web server, is there another way? or the only way to do this is this feature supported by the server. thank you Quote Link to comment Share on other sites More sharing options...
trq Posted July 22, 2009 Share Posted July 22, 2009 You need to execute your script via some type of scheduler installed on the server. Cron is Linux's scheduler. Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted July 22, 2009 Share Posted July 22, 2009 Cron the only way i now in Linux.. not sure about other ways. Why not use cron, its pretty well to perform. Quote Link to comment Share on other sites More sharing options...
n14charlie Posted July 22, 2009 Author Share Posted July 22, 2009 Anyone knows a host that supports it? I was unable to find one Quote Link to comment Share on other sites More sharing options...
Andy-H Posted July 22, 2009 Share Posted July 22, 2009 Does the script need to be run if the site is not being visited by anyone? If not you could create a script to run in the background and create a sort of queue using the time function to update a db field or write to a file and create a loop to run the relevant code for every hour since it was last run? Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted July 22, 2009 Share Posted July 22, 2009 Anyone knows a host that supports it? I was unable to find one Did you mean free hosting? I don't think so, free hosting offer this, you can check http://www.zymic.com/ Quote Link to comment Share on other sites More sharing options...
trq Posted July 22, 2009 Share Posted July 22, 2009 Anyone knows a host that supports it? All good hosts support it. If your looking for free (or crap) hosting, you get what you pay for. Quote Link to comment Share on other sites More sharing options...
n14charlie Posted July 22, 2009 Author Share Posted July 22, 2009 Can anyone tell me if there's a way to simulate cron jobs on my desktop (I'm using windows) .. I need all of this for a project of a web application Im building. edit: I mean, simulate Linux cron jobs on windows so when I need to put it on a real server I will able to. Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 22, 2009 Share Posted July 22, 2009 Can anyone tell me if there's a way to simulate cron jobs on my desktop (I'm using windows) .. I need all of this for a project of a web application Im building. edit: I mean, simulate Linux cron jobs on windows so when I need to put it on a real server I will able to. Did you see the article I just posted showing you how to install a Centos Linux server on your Windows machine in a Virtual machine using Sun's free Virtualbox? Quote Link to comment Share on other sites More sharing options...
kryppienation Posted July 22, 2009 Share Posted July 22, 2009 you can do this using windows scheduled tasks. RUN:path to php.exe filename START IN: path to location of file RUN AS:pcname you must set a password here if you need to login to your desktop example: RUN:C:\htdocs\php\php.exe myfile.php <--there is a space between path and filename START IN:C:\htdocs\awesomeproject\includes RUN AS:HOMEPC\username click on the checkbox for enabled change tabs for the scheduling and settings. Hope this helps out. Quote Link to comment Share on other sites More sharing options...
n14charlie Posted July 22, 2009 Author Share Posted July 22, 2009 Can anyone tell me if there's a way to simulate cron jobs on my desktop (I'm using windows) .. I need all of this for a project of a web application Im building. edit: I mean, simulate Linux cron jobs on windows so when I need to put it on a real server I will able to. Did you see the article I just posted showing you how to install a Centos Linux server on your Windows machine in a Virtual machine using Sun's free Virtualbox? I think this is what I need, thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.