static/jsvm/interfaces/cron.Cron.html
Cron is a crontab-like struct for tasks/jobs scheduling.
addhasStartedjobsmustAddremoveremoveAllsetIntervalsetTimezonestartstoptotal
Add registers a single cron job.
If there is already a job with the provided id, then the old job will be replaced with the new one.
cronExpr is a regular cron expression, eg. "0 */3 * * *" (aka. at minute 0 past every 3rd hour). Check cron.NewSchedule() for the supported tokens.
-
- (): void
-
HasStarted checks whether the current Cron ticker has been started.
Jobs returns a shallow copy of the currently registered cron jobs.
MustAdd is similar to Add() but panic on failure.
-
- (): void
-
Remove removes a single cron job by its id.
RemoveAll removes all registered cron jobs.
SetInterval changes the current cron tick interval (it usually should be >= 1 minute).
SetTimezone changes the current cron tick timezone.
Start starts the cron ticker.
Calling Start() on already started cron will restart the ticker.
Stop stops the current cron ticker (if not already).
You can resume the ticker by calling Start().
Total returns the current total number of registered cron jobs.
OSLightDark
Generated using TypeDoc