-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Scheduler Feature for Running Cron Jobs (#735)
Support scheduler jobs
- Loading branch information
1 parent
9578e93
commit 52e4f82
Showing
28 changed files
with
1,045 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
output: stdout | ||
jobs: | ||
write_content: | ||
shell: true | ||
run: "echo loco >> ./scheduler.txt" | ||
cron: run every 1 second | ||
output: silent | ||
tags: ['base', 'infra'] | ||
|
||
run_task: | ||
run: "foo" | ||
cron: "at 10:00 am" | ||
|
||
list_if_users: | ||
run: "user_report" | ||
shell: true | ||
cron: "* 2 * * * *" | ||
tags: ['base', 'users'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
```console | ||
$ LOCO_ENV=test blo-cli scheduler --list | ||
# job_name cron tags run | ||
1 list_if_users * 2 * * * * base, users "user_report" | ||
2 run_task at 10:00 am - "foo" | ||
3 write_content run every 1 second base, infra "echo loco >> ./scheduler.txt" | ||
|
||
|
||
``` | ||
|
||
```console | ||
$ LOCO_ENV=test blo-cli scheduler --config ./config/scheduler.yaml --list | ||
# job_name cron tags run | ||
1 list_if_users * 2 * * * * base, users "user_report" | ||
2 run_task at 10:00 am - "foo" | ||
3 write_content run every 1 second base, infra "echo loco >> ./scheduler.txt" | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.