Documentation for Cron like events scheduler
This commit is contained in:
parent
46d6b46c0f
commit
75e503ef42
1 changed files with 23 additions and 0 deletions
|
|
@ -260,6 +260,7 @@ Scheduler hooks are methods that are run periodically in background. Structure f
|
|||
* `monthly_long`
|
||||
* `hourly`
|
||||
* `all`
|
||||
* `cron`
|
||||
|
||||
The scheduler events require celery, celerybeat and redis (or a supported and
|
||||
configured broker) to be running. The events with suffix '\_long' are for long
|
||||
|
|
@ -275,3 +276,25 @@ Example,
|
|||
"erpnext.setup.doctype.backup_manager.backup_manager.take_backups_daily"
|
||||
],
|
||||
}
|
||||
|
||||
#### Cron Like Scheduler
|
||||
|
||||
Schedule methods to be executed periodically
|
||||
|
||||
Example,
|
||||
|
||||
scheduler_events = {
|
||||
"cron": {
|
||||
"15 18 * * *": [
|
||||
"frappe.twofactor.delete_all_barcodes_for_users"
|
||||
],
|
||||
"*/6 * * * *": [
|
||||
"frappe.utils.error.collect_error_snapshots"
|
||||
],
|
||||
"annual": [
|
||||
"frappe.utils.error.collect_error_snapshots"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
The asterisk (*) operator specifies all possible values for a field. For example, an asterisk in the hour time field would be equivalent to every hour or an asterisk in the month field would be equivalent to every month.
|
||||
Loading…
Add table
Reference in a new issue