ignisium Posted January 13, 2017 Share Posted January 13, 2017 I just upgraded my installation. Everything went incredibly well, except for the cron, which doesn't seem to be completing. I did a fresh/full upgrade - moved the previous install (6.3.1) to a backup folder and uploaded the complete 7.1.1 package to the WHMCS location. The cron is in home/user directory above public_html. Paths are specified in configuration files for both WHMCS and the crons directory. File permissions are appropriately set for cron files. Server is set to run PHP5.6 via PHP selector in CloudLinux, but I've set the cron to force run 5.6 just in case. Automation settings for WHMCS version 7.x have been applied (i.e. run daily cron at X hour, as well as set the cron to fire every 5 minutes per documentation). Database backups are set to generate and be emailed via the tools in WHMCS. The cron starts just fine, but seems to stop right after applying late fees, every single time - even during the hour when the daily cron actions are support to fire (such as the backup). Here's what the WHMCS logs show: 01/12/2017 03:35 Cron Job: Starting Applying Late Fees System 01/12/2017 03:35 Cron Job: Starting Generating Invoices System 01/12/2017 03:35 Cron Job: Done System 01/12/2017 03:35 Cron Job: Starting Updating Currency Exchange Rates System 01/12/2017 03:35 Cron Job: Running Pre-Cron Hooks System 01/12/2017 03:35 Cron Job: Starting System I ran the cron via CLI, both with the generic php prefix as well as specifying the 5.6 version and here's the result: [[REDACTED] ~]$ php -q /home/[REDACTED]/vision-crons/cron.php debug Starting (Time: 0.92 Memory: 11.97) Running Pre-Cron Hooks (Time: 0.01 Memory: 12.12) Starting Updating Currency Exchange Rates (Time: 0 Memory: 12.13) - Done (Time: 0.07 Memory: 12.23) Starting Generating Invoices (Time: 0 Memory: 12.23) Starting Applying Late Fees (Time: -0.99 Memory: 12.54) [[REDACTED] ~]$ /opt/alt/php56/usr/bin/php -q /home/[REDACTED]/vision-crons/cron.php debug Starting (Time: 0.86 Memory: 11.97) Running Pre-Cron Hooks (Time: 0.01 Memory: 12.12) Starting Updating Currency Exchange Rates (Time: 0 Memory: 12.13) - Done (Time: 0.04 Memory: 12.23) Starting Generating Invoices (Time: 0 Memory: 12.23) Starting Applying Late Fees (Time: 0 Memory: 12.54) [[REDACTED] ~]$ No errors, no "Completed (Time: x Memory: x.x)" line, no email signaling that the cron completed, it's like it just...stops. The whole reason I discovered it wasn't working properly is because: The cron completion email didn't arrive. After reading in the forums here I presume that it's still supposed to generate/email on each cron run, not just the daily actions. The email containing the database backup was never generated/arrived. Any thoughts on what might be wrong and how to fix? The cron was functioning just fine with 6.3.1 before I upgraded. 0 Quote Link to comment Share on other sites More sharing options...
ignisium Posted January 13, 2017 Author Share Posted January 13, 2017 I guess I should have opened this in the "Troubleshooting Issues" forum - feel free to move if necessary. 0 Quote Link to comment Share on other sites More sharing options...
ignisium Posted January 13, 2017 Author Share Posted January 13, 2017 Here's the cPanel cron email BEFORE the upgrade: Starting Running Pre-Cron Hooks Starting Updating Currency Exchange Rates - Done Starting Generating Invoices Invoicing Loop Service ID 8 - 1 of 1 Invoicing Loop Addon ID 7 - 1 of 1 Generated Invoice #392 - 1 Invoices Created Starting Applying Late Fees - Late Invoice Fees added to 0 Invoices Starting Processing Credit Card Charges - Credit Card Payments Processed (0 Captured, 0 Failed) Starting Processing Invoice Reminder Notices - Sent First Notice to User Belinda Smith - Sent 1 Reminders Starting Processing Domain Renewal Notices - Sent 0 Notices Starting Processing Overdue Suspensions - Processed 0 Suspensions Starting Performing Automated Fixed Term Service Terminations - Processed 0 Terminations Starting Auto Closing Inactive Tickets - Processed 0 Ticket Closures Starting Processing Email Marketer Rules Starting Updating Disk & Bandwidth Usage Stats - Done Starting Performing Client Status Sync - Done Completed Cron Job Hooks Run... Starting Database Backup Starting Backup Generation Backup Generation Completed - Email Backup - Sent Successfully - Done Running After Cron Hooks Goodbye and here's how it's arriving AFTER: Starting Running Pre-Cron Hooks Starting Updating Currency Exchange Rates - Done Starting Generating Invoices Starting Applying Late Fees Again, it's like it just stops, and doesn't complete. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted January 13, 2017 Share Posted January 13, 2017 Hey ignisium, Try enabling errors under Setup -> General Settings -> Other -> Display Errors Then try running your cron with -vvv at the end of the command to see what the output it 0 Quote Link to comment Share on other sites More sharing options...
ignisium Posted January 13, 2017 Author Share Posted January 13, 2017 Please disregard. I managed to track down the issue on my own...FINALLY. While I had set the permissions correctly for the WHMCS configuration and cron files, the cPanel module PHP files ([whmcsdirectory]/modules/servers/cpanel) file permissions were not set to allow execution. Adjusting them to 0755 seems to have allowed the cron to finish, as I got the finished email, daily finished email, and database backup email. 0 Quote Link to comment Share on other sites More sharing options...
ignisium Posted January 13, 2017 Author Share Posted January 13, 2017 I ran the cron via command line with the verbose command, and everything ran ok now. I get the green bar with "[OK] Completed." One thing though, now when I try to run the cron via CLI with the "debug" command, the console is giving me the following error: [symfony\Component\Console\Exception\CommandNotFoundException] Command "debug" is not defined. Any idea what that's about? Debug was clearly working for me earlier. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted January 13, 2017 Share Posted January 13, 2017 debug appears to have been removed in favor of the -v options 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted January 13, 2017 Share Posted January 13, 2017 debug appears to have been removed in favor of the -v options Hello ignisium, twhiting9275 is correct, in version 7.1 the "debug" command has been replaced with -vvv for debugging, you can find out more about the current cron commands at http://docs.whmcs.com/Crons#Commands 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.