niels Posted October 8, 2016 Share Posted October 8, 2016 After upgrading to WHMCS 7 I increased the CRON frequency to 5 minutes as suggested by the Upgrade Instructions. I now receive this e-mail every 5 minutes: The cron has run within the last 24 hours.To force the cron to run all operations immediately, please invoke with the following arguments "all --force". I thought maybe I was somehow running an old copy of cron.php, but opening it shows the correct 7.0 version: <?php //00ee8// ************************************************************************* // * * // * WHMCS - The Complete Client Management, Billing & Support Solution * // * Copyright © WHMCS Ltd. All Rights Reserved, * // * Version: 7.0.0 (7.0.0-release.1) * // * BuildId: 98feebc.78 * // * Build Date: 02 Oct 2016 * // * * All other files in the crons folder also have the 7.0 header. Did I overlook something? Or are these e-mails every 5 minutes expected? 0 Quote Link to comment Share on other sites More sharing options...
tdnlsupport Posted October 8, 2016 Share Posted October 8, 2016 I too have this, i think it wants us to add all --force to the end of the cron.php statement in the crontab - but i am not sure about putting it in there till i have confirmation. 0 Quote Link to comment Share on other sites More sharing options...
tdnlsupport Posted October 8, 2016 Share Posted October 8, 2016 Na.. don't do that it will run all the management tasks every 5 mins... i am not sure what the correct behaviour is supposed to be - my management tasks normally run at 00:00 so will see how they run tonight with it set how it is. I have raised a ticket for this issue. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Edward Posted October 9, 2016 WHMCS Technical Analyst Share Posted October 9, 2016 WHMCS itself will email a report to you whenever the cron performs any actions so you don't need to provide an email address in your cron configuration at the server level. By removing your email from there, that will stop these notifications you are receiving every time the cron file is invoked. Alternatively, add the following to the end of your cron command to ignore the output: > /dev/null 2>&1 -Eddy 0 Quote Link to comment Share on other sites More sharing options...
niels Posted October 9, 2016 Author Share Posted October 9, 2016 The CRON process e-mails all messages outputted by CRON jobs to notify the administrator of possible errors. Your "hack" suppresses this very important feature. If the WHMCS cron.php experiences an error and fails to e-mail me about it, I will never know about it when I use your suggestion. I hope you will reconsider this for a future version. The unwritten but well-known rule is that a cron job runs quietly, and outputs only when it needs to notify the administrator. 0 Quote Link to comment Share on other sites More sharing options...
LMG Posted October 10, 2016 Share Posted October 10, 2016 Any solutions for this? 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted October 10, 2016 Share Posted October 10, 2016 Any solutions for this? Alternatively, add the following to the end of your cron command to ignore the output: > /dev/null 2>&1 There's your solution. Right there Something like curl https://domain.com/crons/cron.php > /dev/null 2>&1 OR, if you have ssh access, just edit the cron manually and add MAILTO="" at the top of the file. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 13, 2016 Share Posted October 13, 2016 Another thing that WHMCS didn't thing before implementing in v7. I do not want to disable the cron emails. I actually want to receive them, because they are send to a proper system administrator that checks for errors and logs without WHMCS access. This is done once a day today, but WHMCS suggest to change the cron to every 5 minutes with v7. So its either disable the email feature or get spammed every 5 minutes. The more I'm reading the forums, the more suggestions everywhere to disable things in order to get them to work. This does not seem like an upgrade but a downgrade if you start losing functionality. 0 Quote Link to comment Share on other sites More sharing options...
xyzulu Posted October 14, 2016 Share Posted October 14, 2016 This does not seem like an upgrade but a downgrade if you start losing functionality. I disagree, but you are welcome to your own opinion. Having a system cron running every 5mins will allow WHMCS to run other maintenance tasks in future version at times you choose in WHMCS. This means apart from this single 5min cronjob, everything else can be scheduled in WHMCS. You will receive emails from WHMCS so you're not missing out on anything by disabling the email notification on your server for this cron. And further, if you are worried about email reliability, use a proper SMTP service for your WHMCS emails, I use Postmark at the moment, but you have many choices. 0 Quote Link to comment Share on other sites More sharing options...
slim Posted October 14, 2016 Share Posted October 14, 2016 Brad, you don't get it.. If the Cron fails to run for some reason, WHMCS wont/cant send an email. So there is NO warning or message that something has gone wrong. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Edward Posted October 14, 2016 WHMCS Technical Analyst Share Posted October 14, 2016 Hey Brad, I hear you. I have passed your feedback about the cron output onto our development team for review. -Eddy 0 Quote Link to comment Share on other sites More sharing options...
bear Posted October 15, 2016 Share Posted October 15, 2016 Hey Brad, I hear you. You hear Brad, but not the others? Maybe I misread, but Brad is agreeing with 5 minute crons and suppressing warnings is a good idea. That's the default recommendation from WHMCS, so passing *that* to them is validating that choice they'd made. Others, myself included, would prefer to have the cron emails available to monitor failures in the cron daemon, which WHMCS is unlikely to report back to us since it, well, failed. 0 Quote Link to comment Share on other sites More sharing options...
hubert83 Posted October 20, 2016 Share Posted October 20, 2016 HI, maybe i'm mistaking but i thought if you use "> /dev/null" instead of "> /dev/null 2>&1" errors are still send by email. So that should help then? 0 Quote Link to comment Share on other sites More sharing options...
Beekingo Posted October 20, 2016 Share Posted October 20, 2016 HI, maybe i'm mistaking but i thought if you use "> /dev/null" instead of "> /dev/null 2>&1" errors are still send by email. So that should help then? I think you teach me something new. 0 Quote Link to comment Share on other sites More sharing options...
D9Hosting Posted November 2, 2016 Share Posted November 2, 2016 You hear Brad, but not the others? Maybe I misread, but Brad is agreeing with 5 minute crons and suppressing warnings is a good idea. That's the default recommendation from WHMCS, so passing *that* to them is validating that choice they'd made. Others, myself included, would prefer to have the cron emails available to monitor failures in the cron daemon, which WHMCS is unlikely to report back to us since it, well, failed. Agreed. Cron emails prior to v7 were actually really useful. They contained things that we needed to act on like the failure of automatic account suspensions, cancellations, terminations, failed card payments and so on. It sounds like if we still want to get the useful cron emails we also need to put up with the junk emails every 5 minutes! 0 Quote Link to comment Share on other sites More sharing options...
xyzulu Posted November 2, 2016 Share Posted November 2, 2016 The "cron emails" as you call them (the ones sent via WHMCS) are still sent only daily despite the 5 min cron being needed. You should receive no more or less emails than you currently receive if this is setup the way WHMCS suggests. 0 Quote Link to comment Share on other sites More sharing options...
D9Hosting Posted November 3, 2016 Share Posted November 3, 2016 The "cron emails" as you call them (the ones sent via WHMCS) are still sent only daily despite the 5 min cron being needed. You should receive no more or less emails than you currently receive if this is setup the way WHMCS suggests. WHMCS don't suggest adding /dev/null to the cron job in any of their documentation: http://docs.whmcs.com/Cron_Tasks#System_Cron_Frequency Nor is it mentioned in any of the v7 release notes. Versions prior to 7 didn't require this, so anyone upgrading to v7 is going to be receiving emails every 5 mins. At the very least WHMCS need to update their documentation to let users know they'll need to modify their cron job to disable the email output. 0 Quote Link to comment Share on other sites More sharing options...
xyzulu Posted November 3, 2016 Share Posted November 3, 2016 You are in the web hosting business, I'm sure you are quite capable of configuring your own cronjobs. It's your choice to receive emails from your server whenever the cronjob runs, but WHMCS will still only send you the same amount of emails it used to send you on precious versions. 0 Quote Link to comment Share on other sites More sharing options...
ScrltOTara Posted November 12, 2016 Share Posted November 12, 2016 I'm having the same issue with the cron, it just returns The cron has run within the last 24 hours. To force the cron to run all operations immediately, please invoke with the following arguments "all --force". And nothing is actually done. No invoices are processed or generated. If however, I run it manually using all --force at the end, everything runs correctly. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted November 13, 2016 Share Posted November 13, 2016 Hi ScritOTara, Thanks for your post on the community forums. The message you are seeing indicates that the cron has run once per day, if you look under Setup -> Automation Settings -> Time of Day to see what time your cron runs then, check the email account where your control panel sends your cron emails to to see what the report shows at that time of the day. 0 Quote Link to comment Share on other sites More sharing options...
shoulders Posted November 18, 2016 Share Posted November 18, 2016 Has this been fixed, I am having to suppress the error messages from the cron which is recommend to run every 5 minutes. I am looking for official instrucitons. thanks 0 Quote Link to comment Share on other sites More sharing options...
xyzulu Posted November 18, 2016 Share Posted November 18, 2016 (edited) Nothing is broken. There is nothing WHMCS can do about cronjob notifications as they are sent by. Your server, not WHMCS. Also see: https://forum.whmcs.com/showthread.php?119390-CRON-e-mails-every-5-minutes&p=485850#post485850 <removed by moderator> Edited November 18, 2016 by WHMCS ChrisD Content removed due to rules 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted November 18, 2016 Share Posted November 18, 2016 Hi Everyone, I'm pleased to advise that in Version 7.1 currently in beta we've made some changes to the Cron Output based on feedback from users like yourself. I can confirm that we will no longer output the following message when the cron runs: The cron has run within the last 24 hours.To force the cron to run all operations immediately, please invoke with the following arguments "all --force". You will however continue to receive notifications when your daily cron job runs and in instances where the cron outputs an error. Until 7.1 goes General Release we continue to recommend adding > /dev/null 2>&1 to the end of your cron job this will suppress the output you receive when the cron has nothing to do. We really do appriciate the feedback that you have provided around the cron and look forward to having you check out WHMCS v7.1 soon you can read more in the Blog & Release Notes 0 Quote Link to comment Share on other sites More sharing options...
ethical Posted January 10, 2017 Share Posted January 10, 2017 Hi Chris, I am running 7.1 and i still get this error The cron has run within the last 24 hours. To force the cron to run all operations immediately, please invoke with the following arguments "all --force". Perform WHMCS Update Check Check for Updates: No new updates available - - - Updated - - - I am also curious why do we need to run cron every 5 minutes, I dont understand the necessity or advantage besides all these new useless emails we get everytime it runs? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted January 12, 2017 Share Posted January 12, 2017 Hello John, WHMCS v7.1 shouldn't send these notification please upload a fresh copy of the crons directory to see if this helps. The new cron performs tasks in the background such as Ticket Escalations this table shows when everything runs http://docs.whmcs.com/Crons#Task_Options_for_skip_.26_do You can run it less frequently if you prefer, i'm sure that we'll adding more to the cron over time as well. 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.