Thauwa Posted November 3, 2009 Share Posted November 3, 2009 Hello all! I have a big problem with executing cron jobs. I really need to know how to execute a php file every day at five minute intervals or so. The time factor is essential for me, that's why I can't use some free cron job providers (well, if you do have any suggestions, please do post them (and I don't want to pay! )). Anyway, I still want to know how and why they work, and how I could implement this in my own host's server. I only need simple answers, so don't get all bothered-up trying to answer any complex questions ! I hope that I could get a suitable explanation.. Thanks you! Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/ Share on other sites More sharing options...
Do the sk8 Posted November 3, 2009 Share Posted November 3, 2009 As in; */5 * * * * ? Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-950237 Share on other sites More sharing options...
mikesta707 Posted November 3, 2009 Share Posted November 3, 2009 you should be able to schedule CRON jobs through some control panel that your host provides. If you can't find it I suggest you contact your host about it. Surely they will be able to help you. http://clickmojo.com/code/cron-tutorial.html they even have something that shows you how to schedule a tast every 5 minutes Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-950240 Share on other sites More sharing options...
atl_andy Posted November 3, 2009 Share Posted November 3, 2009 I recently did some research on this, and here is what I use: 0 3 * * * 1,2,3,4,5,6 /usr/bin/php /var/www/test.php That will run every day at 3am. Change the 0 to a */5, and the 3 to a * to run it every 5 minutes. /usr/bin/php is the path to php and /var/www/test.php is the path to your file. Your paths may be different. Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-950418 Share on other sites More sharing options...
Thauwa Posted November 6, 2009 Author Share Posted November 6, 2009 Thanks all, but I've got a problem (assume that I didn't contact my host yet ), but where should I insert the coding akl_ and mike posted? P.S; I now contact my host Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-952410 Share on other sites More sharing options...
Thauwa Posted November 6, 2009 Author Share Posted November 6, 2009 **and Dothesky Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-952424 Share on other sites More sharing options...
trq Posted November 6, 2009 Share Posted November 6, 2009 Thanks all, but I've got a problem (assume that I didn't contact my host yet ), but where should I insert the coding akl_ and mike posted? P.S; I now contact my host Cron jobs like the one atl_andy posted are configured by editing your crontab file if you have shell access or as mikesta707 said, some hosts provide a web interface. Your question is not at all php related. Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-952435 Share on other sites More sharing options...
Thauwa Posted November 8, 2009 Author Share Posted November 8, 2009 ok, thanks. sorry for posting in the wrong forums. Thanks all! Quote Link to comment https://forums.phpfreaks.com/topic/180130-cron-jobs-need-some-help/#findComment-953565 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.