About cron.php task scheduling
Scheduled tasks in DeskPRO are run every minute using your server's scheduling features (e.g., cron on Linux or Task Scheduler on Windows). Every minute, your server will invoke the DeskPRO cron.php command.
It's possible for two commands to run simultaneously. For example, if the task started at 08:00 runs for longer than a minute, the task that starts at 08:01 will start and you will have two tasks running at the same time.
To prevent this, DeskPRO keeps an internal status. When cron.php starts, is_running=yes is set. When cron.php ends, is_running=no is set. That way, DeskPRO knows when an existing task is still running so it can prevent a second task from starting when "is_running" is already "yes".
What the error means
If you get a notice like this:
WARNING: Cron has been active for 15 minutes. Assuming crashed process, resuming.
It usually means that there was a problem processing your scheduled tasks and cron.php crashed. Since the process exited without completing, it means the special is_running flag discussed above did not get reset. Your server would continue to run cron.php every minute but DeskPRO would think a previous task was still running, so it would prevent new tasks from running again.
But after 15 minutes of is_running=yes, DeskPRO guesses there was a problem and tasks resume again anyway. You are sent this alert as a warning that something probably went wrong, and you should investigate.
If it only happened once...
If the problem only happened once (or very infrequently), you might be able to just ignore it. Possible mundane causes include things like server reboots or temporary MySQL or network errors. The system will recover fine in cases like these.
Discovering the cause
Cron tasks should always exit cleanly and when they don't, it means there's a problem we need to investigate.
You can gather further information about the error by following the steps in the article How to debug cron.
Here are some common causes:
- MySQL errors such as "MySQL gone away" usually mean the database server was restarted or it was temporarily inaccessible (e.g. due to a network problem). For singular cases you can just ignore it. If you continue to get the same error multple times, you need to ask your sysadmin to investigate.
- Other MySQL errors such as invalid SQL, insert or update errors, etc. are possibly related to software bugs. You should contact DeskPRO support for help.
- DeskPRO often logs lots of information for non-critical errors like connection timeouts to your mail servers. These notices are for information purposes but would not cause a problem with cron. So they are not indicative of a problem and are probably unrelated.
If you need help trying to find the cause of a cron error, you can contact DeskPRO support. Please contact firstname.lastname@example.org with all of the log files you get from Admin > Server > Error Logs.
One known cause of intermittent cron.php crashes is running DeskPRO on PHP 5.6.
If you have run into this issue and are using PHP 5.6, update DeskPRO to the latest build, which should resolve the issue. If it does not, please report the details of your configuration to email@example.com.
You can also revert to PHP 5.5.x to work around this issue.