Skip to content

Commit

Permalink
docs: practical usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore authored Apr 24, 2021
1 parent 277b8e9 commit 9572e61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ gron.IsDue(expr) // true|false, nil
gron.IsDue(expr, time.Date(2021, time.April, 1, 1, 1, 0, 0, time.UTC)) // true|false, nil
```

In a more practical level, you would use this tool to manage and invoke jobs in app itself and not
mess around with `crontab` for each and every new tasks/jobs. It doesn't yet replace that but rather supplements it.
There is a plan though [#1](https://github.com/adhocore/gronx/issues/1).

In crontab just put one entry with `* * * * *` which points to your Go entry point that uses this tool.
Then in that entry point you would invoke different tasks if the corresponding Cron expr is due.
Simple map structure would work for this.

---
### Cron Expression

Expand Down

0 comments on commit 9572e61

Please sign in to comment.