Jump to content

Need help with cron v7


minadreapta

Recommended Posts

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.

Link to comment
Share on other sites

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 by minadreapta
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated