How to create scheduled cron job/background task?

Hi,
I could not find anything about creating cron jobs(background tasks) in frappe/erpnext. I need to create one task that will occur every Saturday at 6am, fetch data from external site(via its API) and update some fields in ERPNext. Where I should put py file(s)? Can someone provide more resources to this topic?
Thanks!

Anyone?

Here you should start by reading documentation.

2 Likes

I tried these , but I could not use cron job
it works When I get execute ,
but after migrating It does not work

scheduler_events = {
	"cron": {
		"* * * * *": [
			"myapp.tasks.cron"
		]
	},
	"all": [
		"myapp.tasks.cron"
	]
}

scheduler enabled for the site?

1 Like

Hello, I have same problem, I already run bench enable-scheduler too, but my “cron” with specific time, still not working.

my system still in version-12