Μετάβαση στο κύριο περιεχόμενο

How to debug cron - Γνωσιακή βάση / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. Consider upgrading to Deskpro Horizon

How to debug cron

Λίστα συντακτών


Scheduled Tasks/Cron jobs can unexpectedly stop running for a number of reasons. If this occurs, you will see the following notice in your Admin Dashboard:


"Your scheduled task is not running or has crashed. This means important routines like email processing and escalations are not running."

We have outlined steps explaining how to manually obtain verbose logging output from cron jobs for Windows and Linux Operating Systems below.  You can manually run the task from the command-line to see the output.

 

Run scheduled task manually on Windows:

 

1) First, disable your Windows Scheduled Task. If you don't disable the system task, then it's possible you will try to run the task at the same time as your server.

 

2) After disabling the scheduled tasks, wait a few minutes to let any existing tasks finish. You should double-check running processes to ensure no tasks are still running in the Task Manager on Windows.

 
3)
Finally, run the cron command manually:

cd /path/to/deskpro

php.exe -d memory_limit=2G bin\cron --verbose -f

 

You may need to specify the full path to php.exe. e.g. run:

"C:\Program Files (x86)\PHP\v7.0\php.exe" -d memory_limit=2G bin\cron --verbose -f

 

If you want to save the output to a file, you can redirect it like so:

php bin/cron -d memory_limit=2G --verbose -f > cron-log.txt



Run cron task manually on Linux:

 

1) First, disable your Linux cron job. If you don't disable the system task, then it's possible you will try to run the cron job at the same time as your server.


2) After disabling the system cron job, wait a few minutes to let any existing tasks finish. You should double-check running processes to ensure no tasks are still running. For example:

ps aux | grep 'bin/cron'

 

3) Finally, run the cron command manually:

cd /path/to/deskpro

php bin/cron --verbose -f


If you want to save the output to a file, you can redirect it like so:

php bin/cron --verbose -f | tee > cron-log.txt

Βοηθητικό Δεν βοηθάει

64 από 147 χρήστες πιστεύουν ότι αυτή η σελίδα βοηθάει

Προσθήκη σχολίου

Συνδεθείτε ή εγγραφείτε για να υποβάλετε ένα σχόλιο.

Ξεχάσατε τον κωδικό πρόσβασης;