leo_maverick Posted December 8, 2008 Share Posted December 8, 2008 Hi, Can someone please help me with the command used to activate a cron job from the server? I heard from my friends that using 'lynx' was the easiest command, but I assume the hosting server does not support as it shows no page or with no result. Is there any other alternative to run a cron job? Thank you Link to comment https://forums.phpfreaks.com/topic/136028-email-throttling-or-cron-job-using-php/ Share on other sites More sharing options...
chronister Posted December 8, 2008 Share Posted December 8, 2008 Crontab is a Linux function, your hosting provider should have information about it, or it should be in your control panel if it is available. If it is not available, then you can take a look at this other Post I made the other day about using WGET on a windows box with a scheduled task to mimic cron jobs. http://www.phpfreaks.com/forums/index.php/topic,228060.msg1055681.html#msg1055681 Nate Link to comment https://forums.phpfreaks.com/topic/136028-email-throttling-or-cron-job-using-php/#findComment-709247 Share on other sites More sharing options...
trq Posted December 8, 2008 Share Posted December 8, 2008 then you can take a look at this other Post I made the other day about using WGET on a windows box with a scheduled task to mimic cron jobs. wget has nothing at all to do with cron. Link to comment https://forums.phpfreaks.com/topic/136028-email-throttling-or-cron-job-using-php/#findComment-709277 Share on other sites More sharing options...
chronister Posted December 8, 2008 Share Posted December 8, 2008 I know that wget has nothing to do with cron. But used in the manner that I have shown it can "mimic" cron jobs when there is no actual crontab available. The other poster needed to use windows scheduled task to run a php script. It would not run by just putting in a scheduled task pointing to the webpage, or to a browser and passing a webpage as an argument. But since wget does what it does, you can use it to run a php script at a scheduled interval when crontab is not available. I just thought that I would pass this along to original poster as it may be of help if his host does not make crontab available. Nate Link to comment https://forums.phpfreaks.com/topic/136028-email-throttling-or-cron-job-using-php/#findComment-709499 Share on other sites More sharing options...
trq Posted December 8, 2008 Share Posted December 8, 2008 But used in the manner that I have shown it can "mimic" cron jobs when there is no actual crontab available. wget does not mimic cron at all. Its simply makes http requests. The other poster needed to use windows scheduled task to run a php script. It would not run by just putting in a scheduled task pointing to the webpage, or to a browser and passing a webpage as an argument. PHP scripts executed via cron or windows scheduled task should be executed via php's cli, not the webserver. Link to comment https://forums.phpfreaks.com/topic/136028-email-throttling-or-cron-job-using-php/#findComment-709565 Share on other sites More sharing options...
chronister Posted December 8, 2008 Share Posted December 8, 2008 PHP scripts executed via cron or windows scheduled task should be executed via php's cli, not the webserver. I had mentioned that to the other poster and also stated that getting all modules to load that are needed can be a pain. I have tried to do that before and did not have a lot of luck with it. So upon doing some research I found wget for windows and combined with scheduled tasks, was able to schedule it to run at a particular time and execute a php script on the server thereby accomplishing what was needed. Is it the best way, or a good way?? Maybe not, but it works. Nate Link to comment https://forums.phpfreaks.com/topic/136028-email-throttling-or-cron-job-using-php/#findComment-709770 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.