frost Posted August 7, 2007 Share Posted August 7, 2007 Hi all, This is my first post so I hope this is the right place. I have never used cron before, I have cpanel on my host so I can set it up pretty easily I am just unsure of the command. Lets say I wanted to run job.php What would the command be? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/63805-solved-cron-stuff/ Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 Depends on how often you wanted to run it. Every 5 minutes would be... */5 * * * * /path/to/job.php Quote Link to comment https://forums.phpfreaks.com/topic/63805-solved-cron-stuff/#findComment-318190 Share on other sites More sharing options...
frost Posted August 8, 2007 Author Share Posted August 8, 2007 So I don't actually need to issue a command? For example I saw "touch" when I did some Googling. Quote Link to comment https://forums.phpfreaks.com/topic/63805-solved-cron-stuff/#findComment-318404 Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 touch is a *nix command that updates a files last modified time, nothing to do with cron. Ive never used cPanel so I'm really not sure how cron works from there, but if you had shell access you would need to edit your crontabs file. In order to do this you would issue.... crontab -e You would then add the line.... */5 * * * * /path/to/job.php to run job.php every 5 minutes. Quote Link to comment https://forums.phpfreaks.com/topic/63805-solved-cron-stuff/#findComment-318437 Share on other sites More sharing options...
frost Posted August 8, 2007 Author Share Posted August 8, 2007 Awesome, thanks much. Quote Link to comment https://forums.phpfreaks.com/topic/63805-solved-cron-stuff/#findComment-318444 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.