Try ERPNext Buy Support Partners Foundation

Scheduler Events in Custom App not working!

Hi All,
Seems like my scheduler events are not getting triggered.

Steps followed:

  1. bench --site v13 enable-scheduler
  2. sudo supervisorctl restart all
  3. bench doctor

Results :
-----Checking scheduler status-----
Workers online: 3
-----v13 Jobs-----

4.bench console
5. frappe.cache().get_value(‘scheduler_events’)
Results: none

Suggestions please.

1 Like
  1. You can check frappe.get_hooks()["scheduler_events"] to see all scheduler events.
  2. What do the scheduler logs show?

1.frappe.get_hooks()[“scheduler_events”] lists down the cronjob as follows

{‘cron’: {
The standard jobs,
‘* * * * *’: [‘hr_customizations.attendance_request_changes.leave_allocation.allocate_earned_leaves’]},

  1. My custom app directory is as follows:

3.Scheduler logs as" DEBUG scheduler Queued events for site v13"

4.bench execute hr_customizations.attendance_request_changes.leave_allocation.allocate_earned_leaves works fine.

5.Do i need to change custom apps -> hooks.py -> scheduler_events?

1 Like

You must perform bench migrate