katarra Posted March 24, 2010 Share Posted March 24, 2010 I'm trying to get a file from a server to run during a cron job. Does anyone know what I should put in the "Command Line" field to make it run this file? It's located at: public_html/_private/mining_reset.php Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/196389-cron-job-help/ Share on other sites More sharing options...
harristweed Posted March 24, 2010 Share Posted March 24, 2010 possibly something like: php5 -f/home/sites/"your domain name"/public_html/_private/mining_reset.php are there any help pages on your hosting? Quote Link to comment https://forums.phpfreaks.com/topic/196389-cron-job-help/#findComment-1031181 Share on other sites More sharing options...
katarra Posted March 24, 2010 Author Share Posted March 24, 2010 Absolutely no help... I'm using CPanel though, so I've got the time when I want it ran, I just don't know how to type up the command to tell it to run this file. Quote Link to comment https://forums.phpfreaks.com/topic/196389-cron-job-help/#findComment-1031186 Share on other sites More sharing options...
teamatomic Posted March 24, 2010 Share Posted March 24, 2010 Not every system is the same, even with cpanel. What I would do is set it for every minute then put in the full path to the file. If it does not run within two minutes put it the URL. If it does not run in two minutes see if the hoster has a forum. HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/196389-cron-job-help/#findComment-1031190 Share on other sites More sharing options...
katarra Posted March 24, 2010 Author Share Posted March 24, 2010 so i just need to copy the entire path into the command field and then see what happens when i set it to run every minute? Quote Link to comment https://forums.phpfreaks.com/topic/196389-cron-job-help/#findComment-1031206 Share on other sites More sharing options...
teamatomic Posted March 24, 2010 Share Posted March 24, 2010 Yup, what I do is make a test.php file that just writes the time to a text file. Once I know how the system panel accepts input I then put in the correct cron job time and file. No reason to just wait for your real file to run when just testing. HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/196389-cron-job-help/#findComment-1031293 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.