Loading…
Loading…
Choose one of Frappe’s frequencies, or write a cron expression for anything else.
How often
Weekday 0 or 7 is Sunday. If you set both a day and a weekday, either one triggers the job.
scheduler_events = {
"cron": {
"30 6 * * 1-5": [
"my_app.tasks.send_daily_digest",
],
},
}Runs in the default queue. Run bench migrate after editing hooks.py.
The next five runs
In your site’s time zone (System Settings).
Where you see them
Each job becomes a Scheduled Job Type. Its log shows every run, and a System Manager can run it now.
Long or short
Use a _long frequency for anything that takes more than a few minutes, so it does not hold up the default queue.
The scheduler must be on
bench enable-scheduler on the site; nothing runs while it is off.
Add the method to scheduler_events in your app’s hooks.py under a frequency such as daily, or under cron with your own expression, then run bench migrate.
Daily at midnight, weekly at midnight on Sunday, monthly at midnight on the 1st — in the site’s time zone.
The same time, but daily_long jobs run in the long queue, for work that takes minutes rather than seconds.
On every scheduler tick: every 4 minutes by default, set by scheduler_interval in the site config.
Open its Scheduled Job Type: the log lists every run, and a System Manager can run it straight away.
We build scheduled reports, syncs and reminders as proper Frappe apps, and watch that they keep running. Talk to a consultant.
or write to info@acube.co
Kochi (Kadavanthra & Infopark) · Thiruvananthapuram · across India & overseas · In business since 2011