dezkit Posted January 27, 2010 Share Posted January 27, 2010 i am trying to run a script once a day at 12 am, i know it is used by cron, but i am unsure on what to put in. autodelete.php is the name of my file. thank you Quote Link to comment https://forums.phpfreaks.com/topic/190060-syntax-for-cron/ Share on other sites More sharing options...
schilly Posted January 28, 2010 Share Posted January 28, 2010 you should check with your service provider on how to set up crons with them. Quote Link to comment https://forums.phpfreaks.com/topic/190060-syntax-for-cron/#findComment-1002734 Share on other sites More sharing options...
teamatomic Posted January 28, 2010 Share Posted January 28, 2010 0 23 * * * /path/file/autodelete.php >/dev/null 2>&1 depending on the host you might have to provide where php lives 0 23 * * * php /path/file/autodelete.php >/dev/null 2>&1 0 23 * * * user/bin/php /path/file/autodelete.php >/dev/null 2>&1 0 23 * * * user/bin/php4 /path/file/autodelete.php >/dev/null 2>&1 0 23 * * * user/bin/php5 /path/file/autodelete.php >/dev/null 2>&1 its even possible you may need to change the path to a url, but one of the above variations should work. Why not ask your hoster for an example or use their forum? HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/190060-syntax-for-cron/#findComment-1002735 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.