You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`component`| string or table | required | The component to run when a queue message is received. (This is the standard Spin trigger component field.) |
58
-
|`cron_expression`| string | required | The `cron` expresison describing the interval at which the component is executed. |
57
+
|`component`| string or table | required | The component to run on the schedule given in `cron_expression`. (This is the standard Spin trigger component field.) |
58
+
|`cron_expression`| string | required | The `cron` expresison describing the schedule on which to execute the component. |
59
59
60
60
## Building Cron Components
61
61
62
-
Currently only a rust SDK is supported for guest components. The `spin-cron-sdk` along with the [`spin-sdk`](github.com/fermyon/spin) can be used to build cron components. The guest code must have a function decorated with the `#[cron_component]` macro. See `guest/src/lib.rs` for an example in rust.
62
+
Currently only a Rust SDK is supported for guest components. The `spin-cron-sdk` along with the [`spin_sdk` crate](https://docs.rs/spin-sdk) can be used to build cron components. The guest code must have a function decorated with the `#[cron_component]` macro. See `guest/src/lib.rs` for an example in rust.
63
63
64
64
The signature of the function must be `fn handle_cron_event(metadata: Metadata) -> Result<(), Error>`.
65
65
66
-
The `Metadata` object contains a singular field `timestamp` which contains the duration since `00:00:00 UTC on 1 January 1970` (epoch) in seconds.
66
+
The `Metadata` object contains a single field `timestamp` which contains the duration since 00:00:00 UTC on 1 January 1970 (the Unix epoch) in seconds.
0 commit comments