-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7f794f
commit 2e54f40
Showing
3 changed files
with
20 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Job } from '@stacksjs/queue' | ||
import { Every } from '@stacksjs/types' | ||
import { log } from '@stacksjs/cli' | ||
|
||
export default new Job({ | ||
rate: Every.TwoMinutes, // optional, '* * * * *' in cron syntax (overwrites the Scheduler's definition) | ||
handle: () => { // action: 'SendWelcomeEmail', // instead of handle, you may target an action or `action: () => {` | ||
log.info('This cron job log this message every two minutes') | ||
log.info('Please note, any job may also be dispatched individually, or scheduled via ./app/Schedule') | ||
}, | ||
}) |
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