Jbl Posted August 12, 2018 Share Posted August 12, 2018 I'm trying to test my own hook on a recurring service payment. I have set the "Next Due Date" parameter on a product with a date smaller than today, I have run "php -q /var/www/midnightstreamer/whmcs/crons/cron.php" in a terminal but the order won't expire. In client area it's still Active green even if the next due date is expired. Plus, in the panel dashboard I have this warning: Last Automation Run: Never Nees Attention, but when I click the warning link I see: Cron Status Ok Last Run: 12/08/2018 17:05. So, Cron is running correctly or it isn't? I think I'm going to open a ticket for this. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 13, 2018 Share Posted August 13, 2018 Even though you can run cron.php hundreds of times per hour, the daily process that creates invoices and suspend services runs only once per day. Let's say that you want to run it right now. Current time is 11:55 AM. Visit Setup > Automation Settings > Scheduling > Time of Day and set 11:00am. If you run cron.php now, you'll get the daily cron. The daily cron of course is supposed to run only once per day therefore if you want to run it multiple times you have to convince WHMCS that the daily cron didn't run with this query: UPDATE `tblconfiguration` SET value = '' WHERE setting = 'lastDailyCronInvocationTime' Now you can trigger the daily cron again. You need to run this query every time you want to trigger daily cron and don't forget that you also need to update 11:00am as time passes. There are easier approaches but I prefer this one. 3 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.