erpnext v13-beta
Scenario:
- Custom app created and working fine.
- hooks.py updated with adding the scheduled job on hourly basis
- restarted bench and wait for the scheduled task to run.
Situation:
The scheduled task does not run.
Site is set for enable-scheduler
Scheduled Job Log does not show any errors
Scheduled Job Type does not list the newly added scheduled job to the list
Solution:
Go to bench console:
In [1]: from frappe.core.doctype.scheduled_job_type.scheduled_job_type import sync_jobs
In [2]: sync_jobs()
In [3]: frappe.db.commit()
The scheduled job type will now show the newly added scheduled job
The scheduled job will run and show in scheduled job log.
Hope it helps others.