Purging Scheduler Job Logs

Hi there,

Does anyone have an idea of how to purge/clean the job logs in the scheduler?

Clean Jobs Queue did triggered this morning but the job logs in the other schedulers are still there.

Any help would be appreciated…


go into the database,

The Clean Jobs Queue clears any jobs that may have gotten stuck in the queue it doesn’t clear the job logs.

run the query

update schedulers_times set deleted = 1;

This will remove all the job logs.


1 Like

Hi Lewis,

That’s weird, I don’t have such a table in my database?

There is a link reference to this issue and yet I couldn’t find the mentioned function in Scheduler.php.




The table is job_queue.

update job_queue set deleted = 1 where status = ‘done’;


Hi Lewis,

When I select the job_queue table, it shows an empty result set. (Empty table)

Attached is a snapshot from MySQL.

The other snapshot is from the Run Email Reminder Notification.


Hi Lewis,

Okay, I tried it with my actual CRM server and it works. By setting deleted = 1, you won’t see the job log in SuiteCRM but the records are still in MySQL table. Would manually deleting these records from the table cause any fatal results?


Hi Calvin and anyone who could help me.,

I have the same problem here. Did you finally manually deleted records from the job_queue table in phpmyadmin? did you have any problems if you did it?

Thank you very very much.


Got exactly the same question.

In under 1 week the table got 17k of line…

I’ve dropped everything with : DELETE FROM job_queue

Hope someone can help us …

I don’t recommend a simple “DELETE” like that, it’s better to use that clause “WHERE status = ‘done’;” or even add a clause to delete just stuff older than a week, for example.

If your problem is that the lines are still getting added at a fast pace, then check the content of the lines to see exactly which job is creating the lines, so you can examine it.

I can maybe do a view that execute every week to delete log that are older than 1 week, maybe …

Yes, you can.

But if you’re really getting 17k rows added every week, you should try to stop the issue at its source. Otherwise your system will be doing quite a lot of useless work…

That was because every minute those 4 schedulers made a line in the log :

  • Process Workflow Tasks
  • Run Report Generation Scheduled Tasks
  • Check Inbound Mailboxes
  • Run Email Reminder Notifications

I’ve desactivate some, I’ve made to every 6 hours some other…

Note that the default Scheduler jobs configuration should work well, and is not a problem for your server. It’s ok to have jobs running every minute (they’re not really doing anything complicated most of the time, just checking that they have no work to do and exiting). It’s also ok to have lots of stuff in the logs.

What is not normal, and what you should be focusing on, is getting a huge number of stuff on the job queue. I am guessing you have a rogue Wrokflow process or something causing problems. So I repeat my advice, let it fill the job_queue with stuff for a while, and then diagnose the content of the rows in job_queue table. Then you will know what your problem is.