Skip to content

Commit

Permalink
Merge pull request #1301 from fermyon/tpmccallum-patch-11
Browse files Browse the repository at this point in the history
Just a quick note about the 7th field in cron
  • Loading branch information
tpmccallum authored Jun 6, 2024
2 parents 58f5f10 + ecb8e28 commit f0b3520
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/spin/v2/triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ template = "spin_main"
date = "2023-11-04T00:00:01Z"
enable_shortcodes = true
[extra]
url = "https://github.com/fermyon/developer/blob/main/content/spin/triggers.md"
url = "https://github.com/fermyon/developer/blob/main/content/spin/v2/triggers.md"

---
- [Triggers and Components](#triggers-and-components)
Expand Down Expand Up @@ -172,6 +172,8 @@ component = "hello-cron"
cron_expression = "1/2 * * * * *"
```

> Note: The 7th field (year) for the `cron_expression` is optional.
### Cron Trigger Expressions

The expression is based on the crontab (cron table) syntax whereby each line is made up of 7 fields that represent the time to execute.
Expand Down Expand Up @@ -259,4 +261,4 @@ Finished building all Spin components

As we can see from the above output, our application is now running and executing the function every two seconds without the need for any incoming requests or any intervention from users or other machines.

If you would like to learn more about using the Spin Cron Trigger, please check out [the Spin Cron Trigger blog post](https://www.fermyon.com/blog/spin-cron-trigger) and the [Spin Cron Trigger GitHub repository](https://github.com/fermyon/spin-trigger-cron).
If you would like to learn more about using the Spin Cron Trigger, please check out [the Spin Cron Trigger blog post](https://www.fermyon.com/blog/spin-cron-trigger) and the [Spin Cron Trigger GitHub repository](https://github.com/fermyon/spin-trigger-cron).

0 comments on commit f0b3520

Please sign in to comment.