minadreapta Posted March 27, 2017 Share Posted March 27, 2017 Hello, Before upgrading to WHMCS v7 we had the cron running at 8 AM monday to friday. After upgrading to WHMCS 7 we set up 2 crons, one for the weekdays and one for the weekend. We don't want suspensions to take place on Saturdays and Sundays. Now the cron lines looks like this: 0,30 * * * 0,6 php -q /home/username/cron_folder/cron.php skip --AutoSuspensions 0,30 * * * 1-5 php -q /home/username/cron_folder/cron.php In WHMCS the cron is scheduled to run at 8 AM. The problem is that Every Sunday night at midnight (Monday Morning at 00:00) the crons runs and it is suspending due accounts. Why is this happening at midnight? Can anyone suggest how to setup cron jobs so that suspensions and terminations only take place on weekdays at 8 AM? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted March 27, 2017 Share Posted March 27, 2017 This is the expected behaviour based on the cron you, Sunday is day 0, Monday Midnight is Day 1 are you happy for the cron to run suspensions on Saturday morning at 00:00 (Friday Night) or just Monday, Tues, Wed, Thurs at 00:00? 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted March 27, 2017 Author Share Posted March 27, 2017 (edited) Hi ChrisD. i am not happy. I want WHMCS to execute suspensions and terminations mo to fri at 8 am. how can i achieve this? what is hte purpose of the cron schedule in WHMCS admin which is set at 8 AM ? why is it working at 8 AM on weekdays but not on Sunday? thanks. Edited March 27, 2017 by minadreapta 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted March 27, 2017 Share Posted March 27, 2017 Hi minadreapta, The cron schedule in WHMCS does not run unless you have a cron set to run at the same time, The cron line you provided are: 0,30 * * * 0,6 php -q /home/username/cron_folder/cron.php skip --AutoSuspensions 0,30 * * * 1-5 php -q /home/username/cron_folder/cron.php Both of these indicate that they run at 12:30 (00:30) each day with Auto Suspensions not running at 00:30 on Saturday (6) and Sunday (0) but executing with auto suspensions Monday to Friday at 00:00 To ensure that these load as you expect change your cron to the following: 8,0 * * * 0,6 php -q /home/username/cron_folder/cron.php skip --AutoSuspensions 8,0 * * * 1-5 php -q /home/username/cron_folder/cron.php Then ensure that your time under Setup > Automation Settings are set to 8:00am 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted March 27, 2017 Author Share Posted March 27, 2017 i disagree: the autosuspensions don't run Mo to Fri at 00:00 but at 8 AM. this is what's confusing. i will setup the crons as you told. thanks. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted March 27, 2017 Share Posted March 27, 2017 Hmm, do you have another cron setup, prehaps running under root? based on the two crons you've provided theres nothing to trigger then at 8am 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted April 3, 2017 Author Share Posted April 3, 2017 Hello again. It happened again, the cron ran last night at midnight and again this morning at 8. there are no other crons setup as root. the root has only the regular linux/cpanel crons, the midnight cron does only the suspensions and nothing else, it does not even send the "WHMCS Cron Job Activity" mail. again, the crons are just these: 8,0 * * * 0,6 php -q /home/user/whmcs_crons/cron.php skip --AutoSuspensions 8,0 * * * 1-5 php -q /home/user/whmcs_crons/cron.php it seems WHMCS runs suspension the first minute of the first day which has no skipped AutoSuspensions. instead of doing this at 8 AM on that day. and i think this is wrong. is it a bug? 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted April 3, 2017 Author Share Posted April 3, 2017 man that's so wrong. just got a call from a client, a very nervous client that he received a text message from us at midnight and the account was suspended at midnight and he couldn't do anything about it. can someone please suggest how to setup crons so they don't suspend account at midnight? thanks. 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.