manuelgod Posted January 28, 2007 Share Posted January 28, 2007 Hi, I was wondering if someone knows a way to run a php script everyday at midnight, automaticly, without the use of a cronos system since I don't think every host has that capability and if they do, it will be likely not free :(Thanks in advance guys ! Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 28, 2007 Share Posted January 28, 2007 Media Temple offers cron jobs. You could set up your own linux system and just use wgets to call the script. Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted January 28, 2007 Share Posted January 28, 2007 I don't think i understand that answer Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted January 28, 2007 Share Posted January 28, 2007 The only way you can do it is to implement a sort of pseudo-cron where you put a check at the beginning of your pages to see if it is time to run the script and then run it. You would need consistent traffic for this to work though. Quote Link to comment Share on other sites More sharing options...
designationlocutus Posted January 28, 2007 Share Posted January 28, 2007 If you can do it, you can set up a Cron job on your server to run it. Look up Cron Jobs on Google or specialist sites to specifically find out how to do this. You can use it to call a script at a certain time of the day. Quote Link to comment Share on other sites More sharing options...
manuelgod Posted January 28, 2007 Author Share Posted January 28, 2007 Thanks guys for all the replies. I will see if I can find something cheap :)..Later ! Quote Link to comment Share on other sites More sharing options...
nfr Posted January 28, 2007 Share Posted January 28, 2007 If you can't use the "cron", why don't you just use the "at" command on the *nix command line? This is basically the "cron" without actually being the "cron" (if that makes any sense!)man atman atqman atrmman batchRegards,Neil. Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted January 28, 2007 Share Posted January 28, 2007 How would he time it to run periodically? Quote Link to comment Share on other sites More sharing options...
nfr Posted January 28, 2007 Share Posted January 28, 2007 Well, at the end of the shell script (korn, sh, etc.) just issue the command again. So he would run the script once and before completion the script would set the next job up. E.g./scripts/myscript.ksh!#/bin/kshdo somethingat time /scripts/myscript.kshexit 1This would basically create an infinite loop until the script were killed and the jobs were deleted from the atq.Regards,Neil. 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.