Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.8% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org

proxy.golang.org : github.com/ecnepsnai/cron

Package cron provides a pure-go mechanism for executing scheduled tasks with cron patterns. Cron patterns are a simple and flexible way to configure a schedule for which an automated task should run. Each component of the pattern can be: a single numerical value, a range, a comma-separated list of numerical values, an pattern, or a wildcard. Typically all values must match the current time for the job to run, however, when a day of month or day of week is specified (not a wildcard) those two values are OR-d. This can be confusing to understand, so know that the only real gotcha with this quirk is that there is no way to have a job run on a schedule such as 'every Friday the 13th'. It would instead run on every Friday and the 13th of each month. If the component is a numerical value, then the same component (minute, hour, month, etc...) of the current time must match the exact value for the component. If the component is a range, the current time value must fall between that range. If the component is a comma-separated list of numerical values, the current time must match any one of the values. Month and Day of Week values can also be the first three letters of the english name of that unit. For example, JAN for January or THU for Thursday. Components can also be an pattern for a mod operation, such as */5 or */2. Where if the remainder from the current times component and the pattern is zero, it matches. Lastly, components can be a wildcard *, which will match any value. Some example patterns are: This package conforms to the POSIX crontab standard, which can be found here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html Cron wakes up each minute to check for any jobs to run, then sleeps for the remainder of the minute. Under normal circumstances cron is accurate up-to 1 second. Each job's method is called in a unique goroutine and will recover from any panics. By default, Cron operates using the local timezone as determined by Golang, but this can be changed with the TZ field of a Tab object.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ecnepsnai/cron
Keywords: cron, go, golang, scheduler
License: MIT
Latest release: over 1 year ago
First release: over 3 years ago
Namespace: github.com/ecnepsnai
Dependent packages: 1
Dependent repositories: 1
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/ecnepsnai
Last synced: 21 days ago

    Loading...
    Readme
    Loading...