Repository: fermyon/developer
Pull request #1515: added cron tutorial
Author: login: macolso
Created: 2025-04-02T03:41:30Z | Merged: 2025-04-16T22:58:16Z

Content must go through a pre-merge checklist.

Resolves https://github.com/fermyon/a3000-docs/issues/228 

Blocked on https://github.com/fermyon/developer/issues/1514

## Pre-Merge Content Checklist

This documentation has been checked to ensure that:

- [ ] The `title`, `template`, and `date` are all set
- [ ] Does this PR have a new menu item (anywhere in `templates/*.hbs` files) that points to a document `.md` that is set to publish in the future? If so please only publish the `.md` and `.hbs` changes in real-time (otherwise there will be a menu item pointing to a `.md` file that does not exist)
- [ ] File does not use CRLF, but uses plain LF (hint: use `cat -ve <filename> | grep $'\r' | wc -l` and expect 0 as a result)
- [ ] Has passed [`bart check`](https://developer.fermyon.com/bartholomew/quickstart)
- [ ] Has been manually tested by running in Spin/Bartholomew (hint: use `PREVIEW_MODE=1` and run `npm run styles` to update styling)
- [ ] Headings are using Title Case
- [ ] Code blocks have the programming language set to properly highlight syntax and the proper copy directive
- [ ] Have tested with `npm run test` and resolved all errors
- [ ] Relates to an existing (potentially outdated) blog article? If so please add URL in blog to point to this content.



Diff:
diff --git a/content/wasm-functions/using-cron-jobs.md b/content/wasm-functions/using-cron-jobs.md
new file mode 100644
index 000000000..bfc6afc49
--- /dev/null
+++ b/content/wasm-functions/using-cron-jobs.md
@@ -0,0 +1,226 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-world
+
+$ cd hello-world
+
+$ npm install
+```
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. 
+
+To apply the simple log changes, navigate to the `hello-world` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests 
+router.get("/", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-world' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL: https://af30f3b0-ed52-4c5b-b2dd-b261945ff696.aka.fermyon.tech/
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://af30f3b0-ed52-4c5b-b2dd-b261945ff696.aka.fermyon.tech/
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes with the `spin aka crons create` subcommand. The cron job you generate with this subcommand will be associated with the Spin application in your current working directory that you deployed to Fermyon Wasm Functions. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path and (optional) query parameters to invoke.   
+* **Name** – A name for your cron job
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of **schedule** and **path and query*** is unique. You might want multiple cron jobs in a single Spin application when different tasks need to run on separate schedules or require different logic. For example, you may want your Spin appliation to fetch different types of data, perform distinct maintenance routines, or sync with multiple external services independently.
+
+In this example, we’ll schedule a job to hit the `/*` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-world.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/" "cron-job-1"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application every five minutes as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-world
+2025-04-02 04:00:00 [hello-world]  Cron job triggered at 2025-04-12T04:00:00Z
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+--------------+-------------------------+
+| Name           | Schedule     | Next Run                |
++=========================================================+
+| cron-job-1     |  */5 * * * * | 2025-04-02 04:00:00 UTC |
++----------------+--------------+-------------------------+
+```
+
+# Delete Cron Job
+
+To delete a cron job, use:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons delete cron-job-1
+```
+
+<!-- @nocpy -->
+
+```console
+Deleted cron job 'cron-job-1' with schedule '*/5 * * * *'
+```
+
+Your application will persist unless you explicitly run the `spin aka apps delete` command. 
+
+# Next Steps
+
+* Visit [FAQ](faq.md) for frequently asked questions.
\ No newline at end of file
diff --git a/content/wasm-functions/using-cron-trigger.md b/content/wasm-functions/using-cron-trigger.md
deleted file mode 100644
index cc59c22af..000000000
--- a/content/wasm-functions/using-cron-trigger.md
+++ /dev/null
@@ -1,47 +0,0 @@
-title = "Scheduling Tasks with Cron Jobs in Spin"
-template = "functions_main"
-date = "2025-03-25T00:00:01Z"
-enable_shortcodes = true
-
----
-- [Prerequisites](#prerequisites)
-- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
-  - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
-  
-This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka cron` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka cron` command.
-
-# Prerequisites
-Before proceeding, ensure you have the following:
-
-- Spin installed on your machine (Installation Guide)
-- Access to Fermyon Wasm Functions preview (Sign Up Form)
-
-# Introduction to Cron Jobs
-
-## What Are Cron Jobs?
-
-Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance.
-
-Use Cases for Cron Jobs:
-* Automated data backups
-* Periodic API polling
-* Log file rotation
-* Scheduled notifications
-
-# Spin and Fermyon Wasm Functions
-
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
-
-## Create Spin application 
-
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
-
-
-
-## Creating a Cron Job for your Spin application
-
-## Managing Cron Jobs
diff --git a/templates/functions_sidebar.hbs b/templates/functions_sidebar.hbs
index 83bb366d6..5465f1c5a 100644
--- a/templates/functions_sidebar.hbs
+++ b/templates/functions_sidebar.hbs
@@ -22,6 +22,7 @@
         
         <a {{#if (active_content request.spin-path-info "/wasm-functions/property-manager-integration" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/property-manager-integration">Integrating with Property Manager</a>
         <a {{#if (active_content request.spin-path-info "/wasm-functions/using-key-value-store" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/using-key-value-store">Using the Key Value Store</a>
+        <a {{#if (active_content request.spin-path-info "/wasm-functions/using-cron-jobs" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/using-cron-jobs">Using Cron Jobs</a>
         <a {{#if (active_content request.spin-path-info "/wasm-functions/querying-postgresql" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/querying-postgresql">Querying PostgreSQL</a>
         <a {{#if (active_content request.spin-path-info "/wasm-functions/querying-linode-mysql" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/querying-linode-mysql">Querying MySQL (Linode)</a>
         <a {{#if (active_content request.spin-path-info "/wasm-functions/supabase-cache-proxy" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/supabase-cache-proxy">Building a Supabase Cache Proxy</a>


Reviews:
user: login: itowlson
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-02T04:11:49Z
user: login: rylev
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-02T08:41:25Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-02T22:59:40Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T22:08:40Z
user: login: itowlson
body: Thanks for the update @macolso - this is much clearer now - unfortunately I still have a few niggles and typos, and at least one thing which I'm pretty sure is an error.  Sorry for being picky!
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-13T21:28:52Z
user: login: rylev
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T07:39:57Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T20:21:46Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T20:22:56Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T21:18:38Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T21:19:50Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T21:20:13Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T21:20:24Z
user: login: itowlson
body: Thanks @macolso - I agree that this flows better - unfortunately I did get confused at one point, and spotted a couple of what I think were typos arising from the previous reuse of names.  I may be wrong though...
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-15T21:53:13Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T04:01:44Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T04:03:01Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T04:03:39Z
user: login: macolso
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T04:05:13Z
user: login: itowlson
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T04:07:35Z
user: login: itowlson
body: This looks good to me.  I'm happy to defer the "does it list all jobs or current app's jobs" if you want to get this done and dusted, it's a fairly minor detail and we can always add it later if the spirit moves us.  (Although it may be worth waiting for Ryan anyway!)  Thanks for your patience through the review cycles!

state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T04:13:44Z

Review comments:
diff_hunk: @@ -7,18 +7,20 @@ enable_shortcodes = true
 - [Prerequisites](#prerequisites)
 - [Introduction to Cron Jobs](#introduction-to-cron-jobs)
   - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
+- [Create Spin application](#create-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Creating a Cron Job for Your Spin Application](#creating-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
   
-This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka cron` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka cron` command.
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: `spin aka cron` is allowed and may be less jarring.

(I rather feel the long form should be `spin aka cronjobs`.  I've never heard `crons` as a plural before.  But maybe I just mix in the wrong circles!)
created_at: 2025-04-02T03:53:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: ```suggestion
# Create Spin Application 
```

(I disagree with the style guide, but it is what it is.  And it is _extremely_ fierce.)

created_at: 2025-04-02T03:55:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: I don't think `cron` is a trigger in this case?  (We do have a cron trigger, but FWF does it a different way.)
created_at: 2025-04-02T03:56:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: The application isn't "for" scheduling tasks is it?
created_at: 2025-04-02T03:57:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: It's a HTTP trigger which we will run from a cron job.  Sorry for the pedantry but "cron trigger" is a _specific_ thing and if we say this is a cron trigger we will cause a measurable muddle!
created_at: 2025-04-02T03:58:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: Having these as separate blocks kind of disconnects the response from the curl command.  Maybe rephrase along the lines of:

> Test the app to make sure it's working correctly by running:
> (curl block)
> You should see a response along the lines of:
> (response block)
created_at: 2025-04-02T04:00:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: To me this reads like I should see the message from `spin up`, but you actually mean when I curl it.
created_at: 2025-04-02T04:01:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: Reword cron trigger
created_at: 2025-04-02T04:01:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: ```suggestion
Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
```
created_at: 2025-04-02T04:02:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
+
+> `spin aka cron` supports single digits in each cron expression field and intervals in every position except the day of the week (e.g., `* */12 * * *` for every 12 hours). The smallest supported cron configuration is every 5 minutes (`*/5 * * * *`). Other syntax elements like comma-separated lists and ranges are not supported. Please feel free to[leave feedback](https://fibsu0jcu2g.typeform.com/to/G2u4tPcP) if your desired range is not supported. 
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: Is "single digits" correct?  You can't use double-digit numbers for e.g. day of month or hour of day?
created_at: 2025-04-02T04:03:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: Link to the dialect of the crontab format that we support
created_at: 2025-04-02T04:03:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
+
+> `spin aka cron` supports single digits in each cron expression field and intervals in every position except the day of the week (e.g., `* */12 * * *` for every 12 hours). The smallest supported cron configuration is every 5 minutes (`*/5 * * * *`). Other syntax elements like comma-separated lists and ranges are not supported. Please feel free to[leave feedback](https://fibsu0jcu2g.typeform.com/to/G2u4tPcP) if your desired range is not supported. 
+
+Let's create a cron job that runs every hour. Since scheduling is based on UTC, you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: I'm not sure why local/UTC would matter for an "every hour" schedule?  I'm _guessing_ it's that the schedule is "every hour _on_ the hour" and you're thinking about half-hour timezone offsets?  Like okay I convert my local time to UTC, it's 5:08am or whatever, now what do I do with that result?

It may be better to pull out the "times are in UTC" comment to go with the scheduling/crontab discussion perhaps?

created_at: 2025-04-02T04:07:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
+
+> `spin aka cron` supports single digits in each cron expression field and intervals in every position except the day of the week (e.g., `* */12 * * *` for every 12 hours). The smallest supported cron configuration is every 5 minutes (`*/5 * * * *`). Other syntax elements like comma-separated lists and ranges are not supported. Please feel free to[leave feedback](https://fibsu0jcu2g.typeform.com/to/G2u4tPcP) if your desired range is not supported. 
+
+Let's create a cron job that runs every hour. Since scheduling is based on UTC, you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "0 * * * *" "/hello" "hello-cron-job"
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: Maybe explain what these fields are, since they are not named in the command.  I'm guessing the second is the route to be hit.  Is the third the name of the app to be hit?  Or the name of the job?  (In which case how does it know which app to hit?  Is this an "app in current directory" thing?)

If the third parameter is _not_ the name of the app, it would be good to choose a different string from the name of the app, so as to avoid ambiguity.

created_at: 2025-04-02T04:09:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -7,18 +7,20 @@ enable_shortcodes = true
 - [Prerequisites](#prerequisites)
 - [Introduction to Cron Jobs](#introduction-to-cron-jobs)
   - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
+- [Create Spin application](#create-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Creating a Cron Job for Your Spin Application](#creating-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
   
-This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka cron` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka cron` command.
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: We can also consider changing the plugin if we all agree that the nomenclature is off. We did not think long and hard about the most appropriate name. Considering the functionality is labeled as experimental, breaking changes are probably fine. 
created_at: 2025-04-02T08:19:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -7,18 +7,20 @@ enable_shortcodes = true
 - [Prerequisites](#prerequisites)
 - [Introduction to Cron Jobs](#introduction-to-cron-jobs)
   - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
+- [Create Spin application](#create-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Creating a Cron Job for Your Spin Application](#creating-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: ```suggestion
- [Delete a Cron Job](#delete-cron-job)
```
created_at: 2025-04-02T08:19:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: Should it be this? 

```suggestion
# Create a Spin Application 
```
created_at: 2025-04-02T08:20:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: Correct - Cron jobs live at a higher level of abstraction than triggers. The apps still use an `http` trigger, but we schedule those apps to be invoked on a schedule with cron jobs. In the future, we may allow scheduling cron jobs to invoke applications which are built with a cron trigger.

```suggestion
You must have a running Spin application on Fermyon Wasm Functions to associate a cron job with. We'll create a new Spin application using the `http-js` template which we will then invoke on a schedule using a cron job:
```
created_at: 2025-04-02T08:23:51Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: +1 to rewording away from "trigger". I would also use the terminology of "scheduling" versus "applying".
created_at: 2025-04-02T08:25:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: Unfortunately I've not been able to find a good, concise explainer of the syntax we support. We might want to simply write it out here. The unfortunate truth is that currently the _exact_ syntax we support is a bit of an implementation detail. We should limit the syntax for now so that we don't accidentally support something we hadn't originally planned on. 
created_at: 2025-04-02T08:35:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
+
+> `spin aka cron` supports single digits in each cron expression field and intervals in every position except the day of the week (e.g., `* */12 * * *` for every 12 hours). The smallest supported cron configuration is every 5 minutes (`*/5 * * * *`). Other syntax elements like comma-separated lists and ranges are not supported. Please feel free to[leave feedback](https://fibsu0jcu2g.typeform.com/to/G2u4tPcP) if your desired range is not supported. 
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: You can, and the point about comma separated lists and ranges (which is from the original cron proposal) is actually not currently correct (they are supported). See my previous point about how we're currently allowing anything that happens to work with the libraries we're using, and we need to be a bit more strict about it.
created_at: 2025-04-02T08:37:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
+
+> `spin aka cron` supports single digits in each cron expression field and intervals in every position except the day of the week (e.g., `* */12 * * *` for every 12 hours). The smallest supported cron configuration is every 5 minutes (`*/5 * * * *`). Other syntax elements like comma-separated lists and ranges are not supported. Please feel free to[leave feedback](https://fibsu0jcu2g.typeform.com/to/G2u4tPcP) if your desired range is not supported. 
+
+Let's create a cron job that runs every hour. Since scheduling is based on UTC, you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "0 * * * *" "/hello" "hello-cron-job"
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: The syntax is `spin aka crons create $SCHEDULE $PATH_AND_QUERY $NAME_OF_CRON`

Indeed the app that will be hit is the "current app". 
created_at: 2025-04-02T08:39:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
 
-## Create Spin application 
+<!-- @selectiveCpy -->
 
-You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs:
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
 
+$ cd hello-cron-job
 
+$ npm install
+```
 
-## Creating a Cron Job for your Spin application
+We'll go ahead add a specific path for our cron trigger in later steps:
 
-## Managing Cron Jobs
+```toml
+[[trigger.http]]
+route = "/hello"
+component = "hello-cron-job"
+```
+
+Let's modify the response body so we can validate that our application is running on a specific interval. To do so, navigate to `src/index.js` and add the following snippet of code:
+
+<!-- @selectiveCpy -->
+
+```JavaScript
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+let router = AutoRouter();
+
+// Route ordering matters, the first route that matches will be used
+// Any route that does not return will be treated as a middleware
+// Any unmatched route will return a 404
+router
+    .get("/hello", () => {
+    // Grab datetime
+    const now = new Date().toISOString();
+    // Return response with time of invocation
+    return new Response(`Hello from a cron component at ${now}`, { status: 200 });
+});
+
+
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To test locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+If it is working as expected, you should see a message returned along the lines of (but with an accurate datetime):
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+<!-- @nocpy -->
+
+```console
+Hello from a cron component at 2025-03-31T21:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before applying our cron trigger, we must have our Spin application running on the Fermyon Wasm Functions platform. Deploy the application with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/hello
+Hello from a cron component at 2025-04-02T03:16:14.212Z% 
+```
+
+# Creating a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint at our desired interval. The syntax for this request follows standard crontab format.
+
+> `spin aka cron` supports single digits in each cron expression field and intervals in every position except the day of the week (e.g., `* */12 * * *` for every 12 hours). The smallest supported cron configuration is every 5 minutes (`*/5 * * * *`). Other syntax elements like comma-separated lists and ranges are not supported. Please feel free to[leave feedback](https://fibsu0jcu2g.typeform.com/to/G2u4tPcP) if your desired range is not supported. 
+
+Let's create a cron job that runs every hour. Since scheduling is based on UTC, you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "0 * * * *" "/hello" "hello-cron-job"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+-----------+-------------------------+
+| Name           | Schedule  | Next Run                |
++======================================================+
+| hello-cron-job | 0 * * * * | 2025-04-02 04:00:00 UTC |
++----------------+-----------+-------------------------+
+```
+
+You can have multiple cron jobs per Spin application.
path: content/wasm-functions/using-cron-trigger.md
user: login: rylev
body: We should mention that you can have them as long the combination of schedule and path_and_query are unique. 
created_at: 2025-04-02T08:40:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -22,6 +22,7 @@
         
         <a {{#if (active_content request.spin-path-info "/wasm-functions/property-manager-integration" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/property-manager-integration">Integrating with Property Manager</a>
         <a {{#if (active_content request.spin-path-info "/wasm-functions/using-key-value-store" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/using-key-value-store">Using the Key Value Store</a>
+        <a {{#if (active_content request.spin-path-info "/wasm-functions/using-key-value-store" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/using-cron-trigger">Using the Key Value Store</a>
path: templates/functions_sidebar.hbs
user: login: rylev
body: ```suggestion
        <a {{#if (active_content request.spin-path-info "/wasm-functions/using-cron-trigger" )}} class="active" {{/if}} href="{{site.info.base_url}}/wasm-functions/using-cron-trigger">Using Cron Jobs</a>
```
created_at: 2025-04-02T08:41:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -7,18 +7,20 @@ enable_shortcodes = true
 - [Prerequisites](#prerequisites)
 - [Introduction to Cron Jobs](#introduction-to-cron-jobs)
   - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
+- [Create Spin application](#create-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Creating a Cron Job for Your Spin Application](#creating-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
   
-This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka cron` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka cron` command.
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
path: content/wasm-functions/using-cron-trigger.md
user: login: macolso
body: I also lean towards `cron` -- feels a bit more natural.

Also a good reminder I should flag that this feature is experimental in the tutorial
created_at: 2025-04-02T22:59:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,16 +34,158 @@ Use Cases for Cron Jobs:
 * Log file rotation
 * Scheduled notifications
 
-# Spin and Fermyon Wasm Functions
+# Create Spin application 
 
-Spin is a lightweight framework for building WebAssembly microservices and applications. It allows developers to define cron jobs that execute functions at scheduled intervals. To simplify development, Spin provides templates for various use cases, including scheduled tasks. 
+You must have a running Spin application on Fermyon Wasm Functions to apply the cron trigger to. We'll create a new Spin application for scheduling tasks using cron jobs using the `http-js` template:
path: content/wasm-functions/using-cron-trigger.md
user: login: macolso
body: You're right - it's not intended for scheduling tasks but the wording is a bit misleading. I've reworded this sentence.
created_at: 2025-04-03T22:08:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: This only appears to _log_ in the cron case - should the comment be moved inside the `if`?
created_at: 2025-04-13T20:57:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Having two code paths complicates the application.  The application isn't the core point of the tutorial, it's just something we need to have, so I'd keep it as simple as possible.  It already has routing for the `cron-me` URL which is more than enough complexity I reckon...
created_at: 2025-04-13T20:58:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
+
+In this example, we’ll schedule a job that hits the `/cron-me` path with a `msg` query parameter of "fwf" every 5 minutes for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "hello-cron-job"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application at the top of the hour as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Hello, cron job triggered with msg: "fwf" at 2025-04-12T04:00:00Z
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Consider linking this back to the `console.log` statement from from the HTTP application, and maybe put some more motivation around this, both here and when you write the application.  E.g. motivating the application a la "For a real cron job, you'd see its effects in the data it updates or the artifacts it produces. For this tutorial, though, we'll just emit a log, so that we can see the application has been called." and then down here we can say "This is the message we had the application log so that we could see it was being called" or something like that.

(If you keep the "different behaviour when they try it interactively" thing then it would be good to be _extra_ clear about this because the message will be unfamiliar.)

created_at: 2025-04-13T21:03:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
+
+In this example, we’ll schedule a job that hits the `/cron-me` path with a `msg` query parameter of "fwf" every 5 minutes for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "hello-cron-job"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application at the top of the hour as expected. 
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: "top of the hour" vs "every 5 minutes"
created_at: 2025-04-13T21:04:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: ```suggestion
* **Name:** The Spin application to apply the cron job to
```
created_at: 2025-04-13T21:05:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
+
+In this example, we’ll schedule a job that hits the `/cron-me` path with a `msg` query parameter of "fwf" every 5 minutes for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "hello-cron-job"
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Oh man that's a lot of positional parameters and people are going to find it very easy to mess up the order.  I hope we give good error messages if they do.

created_at: 2025-04-13T21:07:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: The plugin docs say that the third parameter is the name of the _cron job_ not the name of the application.

(If that's true, we need to explain which application it's going to hit - I assume the one in the current directory.)

_(ETA: see Ryan's earlier comment https://github.com/fermyon/developer/pull/1515#discussion_r2024352152)_
created_at: 2025-04-13T21:09:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Won't I need to convert my local time to UTC anyway, if I want it to fire at a particular local time?  And then amend it at each DST change?

created_at: 2025-04-13T21:12:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: "Scheduling follows UTC" did not leave me 100% clear that I understood what I was being told.  I _assume_ this is saying that I must enter times of day in UTC rather than local time (i.e. the system does not convert for me).  Could we say explicitly "if your schedule includes a time of day, that time of day must be in UTC"?  (I mean assuming that _is_what it means!)

created_at: 2025-04-13T21:15:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -7,18 +7,20 @@ enable_shortcodes = true
 - [Prerequisites](#prerequisites)
 - [Introduction to Cron Jobs](#introduction-to-cron-jobs)
   - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
+- [Create Spin application](#create-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Creating a Cron Job for Your Spin Application](#creating-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete a Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
   
-This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka cron` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka cron` command.
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
path: content/wasm-functions/using-cron-trigger.md
user: login: itowlson
body: This page seems to be largely the same content as the previous one but with the "cron trigger" language back in... is this meant to have been deleted in favour of the page above?  The TOC entry still points to this one.
created_at: 2025-04-13T21:19:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Consider shoiwing the deploy output so they can see where to find the domain name.
created_at: 2025-04-13T21:26:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
path: content/wasm-functions/using-cron-jobs.md
user: login: rylev
body: That is indeed what it means. 
created_at: 2025-04-14T07:39:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -7,18 +7,20 @@ enable_shortcodes = true
 - [Prerequisites](#prerequisites)
 - [Introduction to Cron Jobs](#introduction-to-cron-jobs)
   - [What Are Cron Jobs?](#what-are-cron-jobs)
-- [Spin and Fermyon Wasm Functions](#spin-and-fermyon-wasm-functions)
-  - [Create Spin application](#create-spin-application)
-  - [Creating a Cron Job for your Spin application](#creating-a-cron-job-for-your-spin-application)
-  - [Managing Cron Jobs](#managing-cron-jobs)
+- [Create Spin application](#create-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Creating a Cron Job for Your Spin Application](#creating-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete a Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
   
-This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka cron` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka cron` command.
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
path: content/wasm-functions/using-cron-trigger.md
user: login: macolso
body: Yes, using-cron-triggers.md should be deleted and the sidebar should be updated to point at using-cron-jobs.md
created_at: 2025-04-15T20:21:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: Yes, that's a good point. I liked your language suggestion below -- I will make that modification. 
created_at: 2025-04-15T20:22:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: I decided to simplify the example and remove the functionality that changes the output depending on whether the app received a direct ping or a cron trigger. I agree that the added complexity outweighs the value it's providing. 
created_at: 2025-04-15T21:18:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
+
+In this example, we’ll schedule a job that hits the `/cron-me` path with a `msg` query parameter of "fwf" every 5 minutes for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "hello-cron-job"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application at the top of the hour as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Hello, cron job triggered with msg: "fwf" at 2025-04-12T04:00:00Z
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: Great suggestion! I added a disclaimer above the source code snippet that this is a simplified example and allude to what operations you may see in a real world example. 
created_at: 2025-04-15T21:19:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
+
+<!-- @nocpy -->
+
+```console
+curl https://ec8f3c23-b73d-4d51-aa69-aabd7ddc132a.aka.fermyon.tech/cron-me
+Hello! This is a direct ping at 2025-04-02T03:16:14.212Z% 
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we will use the `spin aka crons` command to invoke the Spin app's HTTP endpoint on our desired schedule. The syntax for this request follows standard crontab format.
+
+> `spin aka crons` supports multiple digits in each cron expression field and intervals in every position (e.g., `* */12 * * *` for every 12 hours). Syntax elements like comma-separated lists and ranges are currently supported. Scheduling follows UTC and you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution during daylight savings time.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule:** How often the job runs, using standard cron syntax
+* **Path and query:** The HTTP path (and optional query parameters) to invoke
+* **Name:** The Spin applciaton to apply the cron job to
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: Good catch. I've updated accordingly. 
created_at: 2025-04-15T21:20:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,227 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to apply those values later in the tutorial.  
+
+Let's modify the response body to validate that our Spin application is running on a specific interval, and determine whether it was triggered by our cron job or via a direct request. If the request includes query parameters, we can infer that it came from the cron job, which we will set up in future steps. We’ll use this identifier to log the cron event. To apply these changes, navigate to the `hello-cron-job` directory, go to `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Route ordering matters:
+// - The first matching route is used
+// - Routes can act as middleware if they don’t return a response
+// - Unmatched routes return a 404
+router
+    .get("/cron-me", (request) => {
+        // Parse the request URL to access query parameters
+        const url = new URL(request.url);
+        
+        // Read the 'msg' query parameter, defaulting to an empty string if not provided
+        const msg = url.searchParams.get("msg");
+
+        // Capture current timestamp for logging and response
+        const now = new Date().toISOString();
+
+        // Log the trigger event, including the value of 'msg'
+        if (msg) {
+            console.log(`Hello, cron job triggered with msg: "${msg}" at ${now}`);
+            // Return a success response with a status 200
+            return new Response( {
+                status: 200,
+            });
+        } else {
+            // Return a direct ping response without logging
+            return new Response(`Hello! This is a direct ping at ${now}`, {
+                status: 200,
+            });
+        }
+    });
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see a message returned along the lines of (_but with an accurate datetime at the time of following this tutoral_):
+
+<!-- @nocpy -->
+
+```console
+Hello! This is a direct ping at 2025-04-02T02:45:25.562Z
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we deploy our Spin application to the Fermyon Wasm Functions platform. Deploy the application with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should receive a domain name that you can use to test the application:
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: Added, good suggestion!
created_at: 2025-04-15T21:20:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Do we need to add a second trigger?  Is this trying to illustrate a recommended practice?  It would be good to say more about the motivation because right now this feels like a step I follow without knowing why.

created_at: 2025-04-15T21:37:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: This seems a bit disconnected from "add a trigger."  It feels like you're setting up for a mental model of "multiple cron jobs per app, each cron job handled by a different component, those components on different triggers, cron jobs mapped to components via their routes" but it's not explicit, and the "each trigger points at the same component as the everything route and we route within the component" doesn't draw out that structure.

Perhaps move this down to where you talk about creating cron jobs, and if you want to talk about how to structure a multi-job app then do so there?  And focus on the simple "get something working" path here?  Or do you feel that leads readers to a dead end?

created_at: 2025-04-15T21:43:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Consider breaking this up - "it applies to the app in your current directory" is important enough that it shouldn't be a parenthesis under "the name for the job".  E.g.

```suggestion
* **Name** – A name for your cron job

The cron job will always invoke the Spin application in your current working directory.
```

(or perhaps "...will always invoke the Spin application deployed from your current..." which avoids any implication that it will invoke it _in_ your cwd, but is perhaps awkward and requires extra effort for the reader to parse, not sure)

created_at: 2025-04-15T21:48:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
+
+In this example, we’ll schedule a job to hit the `/cron-me` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "cron-job-1"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application every five minutes as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Cron job triggered at 2025-04-12T04:00:00Z with msg: "fwf" 
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+--------------+-------------------------+
+| Name           | Schedule     | Next Run                |
++=========================================================+
+| hello-cron-job |  */5 * * * * | 2025-04-02 04:00:00 UTC |
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: ```suggestion
| cron-job-1 |  */5 * * * * | 2025-04-02 04:00:00 UTC |
```

or wait, are you saying this is the app name rather than the job name?

(I am not sure if the command shows _all_ cron jobs or only the ones associated with the current app.)

created_at: 2025-04-15T21:49:36Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
+
+In this example, we’ll schedule a job to hit the `/cron-me` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "cron-job-1"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application every five minutes as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Cron job triggered at 2025-04-12T04:00:00Z with msg: "fwf" 
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+--------------+-------------------------+
+| Name           | Schedule     | Next Run                |
++=========================================================+
+| hello-cron-job |  */5 * * * * | 2025-04-02 04:00:00 UTC |
++----------------+--------------+-------------------------+
+```
+
+# Delete Cron Job
+
+To delete a cron job, use:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons delete hello-cron-job
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: ```suggestion
spin aka crons delete cron-job-1
```
created_at: 2025-04-15T21:51:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
+
+In this example, we’ll schedule a job to hit the `/cron-me` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "cron-job-1"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application every five minutes as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Cron job triggered at 2025-04-12T04:00:00Z with msg: "fwf" 
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+--------------+-------------------------+
+| Name           | Schedule     | Next Run                |
++=========================================================+
+| hello-cron-job |  */5 * * * * | 2025-04-02 04:00:00 UTC |
++----------------+--------------+-------------------------+
+```
+
+# Delete Cron Job
+
+To delete a cron job, use:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons delete hello-cron-job
+```
+
+<!-- @nocpy -->
+
+```console
+Deleted cron job 'hello-cron-job' with schedule '*/5 * * * *'
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: ```suggestion
Deleted cron job 'cron-job-1' with schedule '*/5 * * * *'
```
created_at: 2025-04-15T21:51:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: I went back and forth on this... I decided to not add a second trigger to keep the example simple. Perhaps I can write a more realistic example for Spin Hub that we can link as a resource at the end of the tutorial for those interested in that scenario. 


To simplify things, I've removed the specific path and replaced it with wildcard. 
created_at: 2025-04-16T04:01:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: Agreed - I've moved it down to the section where I talk about the required parameters for the `spin aka crons create` subcommand. I decided to not expand into multi-job to keep the tutorial manageable, but I like the idea of creating a more complex example for Spin Hub or fwf-examples we can link to in this tutorial for those wanting a more realistic example. 
created_at: 2025-04-16T04:03:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: Good point about highlighting this. I removed it from parenthesis and put it at the beginning of the paragraph for this section. 
created_at: 2025-04-16T04:03:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
+
+In this example, we’ll schedule a job to hit the `/cron-me` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "cron-job-1"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application every five minutes as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Cron job triggered at 2025-04-12T04:00:00Z with msg: "fwf" 
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+--------------+-------------------------+
+| Name           | Schedule     | Next Run                |
++=========================================================+
+| hello-cron-job |  */5 * * * * | 2025-04-02 04:00:00 UTC |
path: content/wasm-functions/using-cron-jobs.md
user: login: macolso
body: d'oh - typo! I fixed this. I also renamed the app to "hello-world" to avoid confusion between app name and cron job name.  

> I am not sure if the command shows all cron jobs or only the ones associated with the current app.)
@rylev any guidance on this? I'm not sure
created_at: 2025-04-16T04:05:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,237 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-cron-job
+
+$ cd hello-cron-job
+
+$ npm install
+```
+
+We'll go ahead add a path that will be used our cron job in later steps:
+
+```toml
+[[trigger.http]]
+route = "/cron-me"
+component = "hello-cron-job"
+```
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of schedule and path_and_query is unique. We will review how to set those values later in the tutorial.  
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the message query value each time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might use these values to query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. To apply the changes, navigate to the `hello-cron-job` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests at /cron-me
+router.get("/cron-me", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Read the 'msg' query parameter, defaulting to an empty string if not provided
+    const msg = url.searchParams.get("msg") || "";
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now} with msg: "${msg}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000/cron-me
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-cron-job' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL:   https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/
+  Routes:
+  - hello-cron-job: https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://1064f8cc-4b83-4fb0-a550-ff51d8a85a18.aka.fermyon.tech/cron-me
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes. The `spin aka crons` create subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path (and optional query parameters) to invoke
+* **Name** – A name for your cron job (this will be associated with the Spin application in your current working directory)
+
+In this example, we’ll schedule a job to hit the `/cron-me` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-cron-job.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/cron-me?msg=fwf" "cron-job-1"
+```
+
+You should see output similar to:
+
+<!-- @nocpy -->
+
+```console
+Created cron which will next run at 2025-04-02 04:00:00 UTC
+```
+
+If we wait 5 minutes and check our application logs with the `spin aka logs` subcommand, we will see that our cron job invoked the application every five minutes as expected. 
+
+<!-- @nocpy -->
+
+```console
+spin aka logs -a hello-cron-job
+2025-04-02 04:00:00 [hello-cron-job]  Cron job triggered at 2025-04-12T04:00:00Z with msg: "fwf" 
+```
+
+# Managing Cron Jobs
+
+You can view all of your running cron jobs with:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons list
+```
+
+<!-- @nocpy -->
+
+```console
++----------------+--------------+-------------------------+
+| Name           | Schedule     | Next Run                |
++=========================================================+
+| hello-cron-job |  */5 * * * * | 2025-04-02 04:00:00 UTC |
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: Having thoroughly distinct different names for the app and the cron job is an excellent idea - thank you!

created_at: 2025-04-16T04:07:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,226 @@
+title = "Scheduling Tasks with Cron Jobs in Spin"
+template = "functions_main"
+date = "2025-03-25T00:00:01Z"
+enable_shortcodes = true
+
+---
+- [Prerequisites](#prerequisites)
+- [Introduction to Cron Jobs](#introduction-to-cron-jobs)
+  - [What Are Cron Jobs?](#what-are-cron-jobs)
+- [Create a Spin Application](#create-a-spin-application)
+  - [Deploy Spin Application to Fermyon Wasm Functions](#deploy-spin-application-to-fermyon-wasm-functions)
+- [Scheduling a Cron Job for Your Spin Application](#scheduling-a-cron-job-for-your-spin-application)
+- [Managing Cron Jobs](#managing-cron-jobs)
+- [Delete Cron Job](#delete-cron-job)
+- [Next Steps](#next-steps)
+  
+This tutorial guides you through the process of scheduling HTTP requests in a Spin application running on Fermyon Wasm Functions using cron jobs. The `spin aka crons` command allows applications to receive scheduled HTTP triggers without relying on external services. In this tutorial, you'll learn how to define and manage cron jobs using the `spin aka crons` command.
+
+# Prerequisites
+Before proceeding, ensure you have the following:
+
+- Spin and the `spin aka` plugin installed on your machine ([Installation Guide](./quickstart.md))
+- Access to Fermyon Wasm Functions preview ([Sign Up Form](https://fibsu0jcu2g.typeform.com/fwf-preview))
+
+# Introduction to Cron Jobs
+
+## What Are Cron Jobs?
+
+Cron jobs are scheduled tasks that run at specified intervals. They are commonly used for automating repetitive tasks such as data processing, report generation, and background maintenance. Other potential use cases include: 
+
+* Automated data backups
+* Periodic API polling
+* Log file rotation
+* Scheduled notifications
+
+# Create a Spin Application 
+
+You must have a Spin application deployed to Fermyon Wasm Functions to associate a cron job. We'll create a new Spin application using the `http-js` template, which we will then invoke on a schedule using a cron job in later steps:
+
+<!-- @selectiveCpy -->
+
+```console
+$ spin new -t http-js --accept-defaults hello-world
+
+$ cd hello-world
+
+$ npm install
+```
+
+Let’s update the event handler to confirm that our Spin application runs at the expected interval. To keep things simple, we’ll add a log statement that prints the time the application is triggered. This will help us verify that the cron job is working correctly. In a real-world scenario, you might query a database for stale records, call an API to sync data, or trigger a more complex workflow like sending a report or cleaning up expired sessions. 
+
+To apply the simple log changes, navigate to the `hello-world` directory, open `src/index.js`, and add the following code snippet:
+
+<!-- @selectiveCpy -->
+
+```javascript 
+// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
+import { AutoRouter } from 'itty-router';
+
+// Initialize the router
+let router = AutoRouter();
+
+// Define a route that responds to GET requests 
+router.get("/", (request) => {
+    // Parse the request URL to access query parameters
+    const url = new URL(request.url);
+
+    // Capture the current timestamp
+    const now = new Date().toISOString();
+
+    // Log every time the route is triggered, including the message (if any)
+    console.log(`Cron job triggered at ${now}"`);
+
+    // Return a generic success response
+    return new Response("Cron job executed", {
+        status: 200,
+    });
+});
+
+// Attach the router to the fetch event
+addEventListener('fetch', (event) => {
+    event.respondWith(router.fetch(event.request));
+});
+```
+
+To build and run the application locally, run the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin build --up
+```
+
+Let's curl the application's endpoint to test if it is working as expected:
+
+<!-- @selectiveCpy -->
+
+```console
+curl localhost:3000
+```
+
+ You should see the following output in response:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+## Deploy Spin Application to Fermyon Wasm Functions
+
+Before scheduling our cron job, we must deploy our Spin application to the Fermyon Wasm Functions platform with the following command:
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka deploy
+```
+
+Upon successful deployment, you should see output along the lines of:
+
+<!-- @nocpy -->
+
+```console
+App 'hello-world' initialized successfully.
+Waiting for application to be ready... ready                                                                                   
+
+Application URL: https://af30f3b0-ed52-4c5b-b2dd-b261945ff696.aka.fermyon.tech/
+```
+
+You can use the domain name provided to you by Fermyon Wasm Functions to test that the Spin application is working as expected by curling the new endpoint:
+
+<!-- @selectiveCpy -->
+
+```console
+curl https://af30f3b0-ed52-4c5b-b2dd-b261945ff696.aka.fermyon.tech/
+```
+
+You should receive the same message as you did during local testing:
+
+<!-- @nocpy -->
+
+```console
+Cron job executed
+```
+
+# Scheduling a Cron Job for Your Spin Application
+
+Now we’ll use the `spin aka crons` command to invoke the Spin application's HTTP endpoint on a scheduled basis. The schedule uses standard crontab syntax.
+
+> `spin aka crons` supports multiple digits in each cron field, as well as intervals in any position (e.g., `* */12 * * *` to run every 12 hours). You can also use comma-separated lists and ranges. If your schedule includes a specific time of day, be sure to use UTC—you may need to [convert your local time to UTC](https://www.worldtimebuddy.com/?pl=1&lid=100&h=100&hf=1) to ensure correct execution.
+
+Let’s create a cron job that triggers your Spin application every 5 minutes with the `spin aka crons create` subcommand. The cron job you generate with this subcommand will be associated with the Spin application in your current working directory that you deployed to Fermyon Wasm Functions. The `spin aka crons create` subcommand takes three arguments:
+
+* **Schedule** – How often the job runs, in standard cron syntax
+* **Path and query** – The HTTP path and (optional) query parameters to invoke.   
+* **Name** – A name for your cron job
+
+> Note that you can have multiple cron jobs per Spin application as long as the combination of **schedule** and **path and query*** is unique. You might want multiple cron jobs in a single Spin application when different tasks need to run on separate schedules or require different logic. For example, you may want your Spin appliation to fetch different types of data, perform distinct maintenance routines, or sync with multiple external services independently.
+
+In this example, we’ll schedule a job to hit the `/*` path with a msg query parameter set to "fwf" every 5 minutes, for a Spin app named hello-world.
+
+<!-- @selectiveCpy -->
+
+```console
+spin aka crons create "*/5 * * * *" "/*" "cron-job-1"
path: content/wasm-functions/using-cron-jobs.md
user: login: itowlson
body: ```suggestion
spin aka crons create "*/5 * * * *" "/" "cron-job-1"
```
created_at: 2025-04-16T04:10:04Z
author_association: CONTRIBUTOR

PR comments:
user: login: itowlson
created_at: 2025-04-02T03:52:15Z
body: FWIW I would not block this on updating the command reference but we would want to update the plugin install instructions so people get the 0.3 version.
author_association: CONTRIBUTOR
user: login: itowlson
created_at: 2025-04-03T22:18:09Z
body: @macolso it occurred to me that one question with this is "how do I know it worked?"  What does the reader see if they follow the tutorial?  Can they see the HTTP responses in cron logs, for example?

(If not, what is the simplest example app that they can cron and still see an observable result?  A silly example might be: an app with two routes: `/cron-me` increments a value in KV storage, and `/count-me` responds with a message like "I've been cronned N times."  So the cron job could hit `/cron-me`, and the user could curl `/count-me` to see the value increment over time.  I realise this makes the tutorial more complicated, and distracts from the focus on the cron job though.)

author_association: CONTRIBUTOR
user: login: macolso
created_at: 2025-04-11T20:35:39Z
body: @itowlson I had a similar niggle with this tutorial. You can actually see the HTTP responses in the cron logs! I've updated the sample application to log cron events, inferring whether it's a cron event or a direct ping based on the presence of a query parameter. Let me know if this feels like a hacky solution, and I can remove that nuance.
author_association: CONTRIBUTOR
user: login: macolso
created_at: 2025-04-15T21:22:28Z
body: @itowlson Excellent feedback—thank you! I've taken another stab at addressing the concerns. I think it flows much better now, and I agree that the simplified example makes it easier to read and keeps the user focused on the task at hand. Let me know what you think
author_association: CONTRIBUTOR
user: login: macolso
created_at: 2025-04-16T22:58:10Z
body: > This looks good to me. I'm happy to defer the "does it list all jobs or current app's jobs" if you want to get this done and dusted, it's a fairly minor detail and we can always add it later if the spirit moves us. (Although it may be worth waiting for Ryan anyway!) Thanks for your patience through the review cycles!

Thanks for all the polish help! Between writing most of this at conferences or on plane, it definitely needed the help... I will go ahead and merge and we can add the "does it list all jobs or current app's jobs" later. I think it would be helpful to maybe even include an article about the purpose of that config file in our docs since it's a bit of an "insider knowledge" resource ATM. 
author_association: CONTRIBUTOR