Update for docs (#116)

* Update for docs

* More changes and fix
This commit is contained in:
Maciej Ratyński authored and GitHub committed 2023-04-21 00:07:57 +10:00
1 parent 5850640094
commit 8ca3c1bdfc
21 files changed
+190 -7

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
### lib.cron.new
Creates a new [cronjob](https://en.wikipedia.org/wiki/Cron), scheduling a task to run at fixed times or intervals.
Supports numbers, any value `*`, lists `1,2,3`, ranges `1-3`, and steps `*/4`.
Day of the week is a range of `1-7` starting from Sunday and allows short-names (i.e. sun, mon, tue).
```lua
lib.cron.new(expression, job, options)
```
* expression:
* string A cron expression such as `* * * * *` representing minute, hour, day, month, and day of the week
* job:
* fun(task: `OxTask`, date: `osdate`)
* options?:
* debug?: `boolean`