Bluebirdut Posted June 17, 2011 Share Posted June 17, 2011 Hello, Weve just finished development on an addone module for our WHMCS but we need to run a cron once a week. How can we achieve this without having to hardcode our db connections into the cron? Thanks 0 Quote Link to comment Share on other sites More sharing options...
equipc Posted June 17, 2011 Share Posted June 17, 2011 I think there's a action hook for cron ... 0 Quote Link to comment Share on other sites More sharing options...
downunder Posted August 30, 2011 Share Posted August 30, 2011 http://docs.whmcs.com/Hooks:Misc#DailyCronJob 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 30, 2011 Share Posted August 30, 2011 Yup, just use the DailyCronJob action hook and wrap the whole thing around an if statement to check the day of week. $DayOfWeek = date('N'); if ($DayOfWeek == 1) { // Its Monday, do stuff. } 0 Quote Link to comment 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.