Blog
Trigger an AI Agent with a Scheduled Cron Job
Tutorial
ยท
Quick answer: To trigger an AI agent with a scheduled cron job, add the Custom Schedule (Cron) trigger to a BuildShip workflow. Set a five-field cron expression and a time zone (for a Monday 6am brief in Australia/Sydney, use 0 6 * * 1 and choose that zone). The Location field is filled from your workspaceโs Google Cloud region. Click Connect. This trigger has no incoming payload and does not support Get Data, so you test it from Workflow Testing in the Build tab. In this guide the clock is the event: every Monday at 6am the agent pulls last weekโs energy-meter exports, flags anomalies and writes a one-page brief for ops. A general chat agent can only write that brief if you paste the numbers in, and it cannot run on a schedule or leave a log of the run.

Not every useful agent should wait for a webhook. A weekly energy brief has to exist at 6am on Monday, whether or not anyone clicked anything. The clock is the event. That is a different job from polling a database every five minutes to see if a row changed. If a webhook or a database trigger can tell you that something happened, use that. We made that case in Why AI Agents Need Listeners, Not Cron Jobs. This post is the other half: when the time of day really is the thing you are waiting for.
A chat agent can summarise a spreadsheet if you paste it in on Monday morning. It cannot wake itself at 6am, pull last weekโs meter files, write a brief to a shared folder and post the link to an ops channel.
That is the job of an AI agent with a backend. The schedule is the trigger. The agent writes the brief. BuildShip keeps a log of both.
When a cron job should trigger an AI agent
The Custom Schedule (Cron) trigger starts a BuildShip workflow at a time you set, using a standard five-field cron expression and a time zone. Behind the scenes, schedule triggers are run by Google Cloud Scheduler.
Use it when the work is about the period that just ended, or about a time of day people already expect:
A Monday morning energy, sales or incident brief for the week just gone.
A weekday 9am digest of tickets still open.
A nightly backup report or a month-end pack.
Do not use it as a stand-in for a listener. If you are asking โhas this row changed yet?โ, the answer should come from a Supabase, Firestore or payment trigger, not from a cron that guesses. If you only have a public page with no webhook, a short interval poll can be justified. That is a different trigger, the Scheduled Interval one, and a different post.
We also have an older walkthrough that uses a schedule for daily news, sport and stocks updates. This guide is a weekly ops brief, and it is explicit about when cron is the right trigger.
What the Custom Schedule (Cron) trigger actually does
You add the trigger on the Connect tab, fill in three fields, and click Connect.
Location. The Google Cloud region where the schedule will run. This is filled automatically from the region on your workspace.
Schedule. A five-field cron expression: minute, hour, day of month, month, day of week. Day of week uses 0 to 6, where 0 is Sunday and 1 is Monday, as the docs describe. The docs also note that 0 and 7 often both mean Sunday. For this brief, you want Monday, so use
1.Time Zone. The zone the expression is evaluated in.
0 6 * * 1means 6:00 on Monday in the zone you pick, not 6:00 UTC, unless you chose UTC.
The docsโ examples include 30 15 * * * for 3:30pm every day, and 0 9 * * 1-5 for 9:00 on weekdays. Special syntax such as */x, ranges (1-5) and lists (1,15) works as you would expect in cron.
This trigger has no input or output mapping, and Get Data is not supported, because nothing arrives from outside. The workflow starts empty, then your nodes pull the data they need. You test the flow with Workflow Testing in the Build tab, then let the first scheduled run prove the clock.
Connect is what registers the schedule. If you change the expression or the time zone later, update the trigger and connect again so the scheduler is in sync.
A concrete case: a Monday 6am energy brief
Take an operations team that receives meter exports into a bucket or a database every day, but only sits down together on Monday morning. They need a one-page view of last week: total usage, the sites that jumped, and anything that looks like a fault. If someone builds that by hand at 8am, the meeting has already started.
Here is the path I would build:
Every Monday at 6:00 in Australia/Sydney, the Custom Schedule (Cron) trigger starts the workflow.
The workflow loads last weekโs meter exports, from the previous Monday 00:00 through Sunday 23:59 in that same zone. Compute those timestamps in code, from the run time and the time zone. Do not let the model decide the date range.
A script node totals usage by site, compares each site with the week before, and flags values outside a rule you own, such as a 30 percent jump or a meter that stopped reporting.
An AI step turns that already-computed table into a one-page brief: a short opening, the outliers, and a list of sites that need a look. It must not invent a reading or a site that is not in the table. If there are no outliers, it should say so.
The workflow stores the brief as a file (BuildShip Cloud Storage, a shared Drive folder, or your own bucket) under a stable name such as
energy/2026-10-13-brief.pdfor a Markdown file, and writes a row with the week, the file URL and a count of flags.It posts the link to the ops channel, early enough that people can read it before the 9am standup.
If a Monday run is already in progress, do not start a second brief for the same week. Key the log row on the week starting date.
The model is there for the prose. The date range, the totals and the flags are ordinary computation.

The clock is the event. The numbers still come from your data, not from the model.
Set up the trigger
In BuildShip, create a workflow, open the Connect tab and add Custom Schedule (Cron).
Leave Location as the prefilled Google Cloud region for your workspace, unless you have a reason to change it and the field allows that.
Set Schedule to
0 6 * * 1. That is 6:00 on Monday.Set Time Zone to
Australia/Sydney, or to the zone your ops team actually works in. If the team is in London, 6am should be Europe/London, not Sydney.Click Connect.
To test the body of the workflow before Monday, use Workflow Testing in the Build tab and pass any sample inputs your pull steps need. You will not get a payload from Get Data. To test the clock itself, you can temporarily use a more frequent expression in a development workflow, then set it back to 0 6 * * 1 before you treat it as production.
If you are not sure about an expression, check it against the cron syntax in the docs. A common mistake is writing 6am as 6 0 * * 1 (which is 00:06) or forgetting that the day-of-week field is the fifth field.
Build the weekly brief agent
Fix the window in code. From the current run time, compute last Monday to last Sunday in the triggerโs time zone. Query only that range. Log the start and end, so a late or early brief is easy to spot.
Score in code, write in the model. Totals, week-on-week changes and โthis meter sent no rowsโ belong in a script node, with thresholds you can change. Pass the resulting table into an AI node (keyless nodes run on your BuildShip credits, or you can bring your own provider key):
> You write a one-page weekly energy brief for an operations team. Using only the site totals, week-on-week changes and flagged anomalies provided, write a short opening, a list of sites that need attention, and one closing line. Do not add sites or numbers that are not in the table. If there are no flags, say that the week looks normal and list the three highest-usage sites without treating them as faults.
Store, then notify. Save the brief first, write the week row, then post the link. If the channel post fails, you still have the file and the log.
Keep Mondays from overlapping. If a run is still writing when a person retriggers a test, or if you ever use a tighter schedule during development, skip a second write for a week that already has a complete row.
If you would rather not wire the canvas by hand, click Build with AI to open Compass and describe the flow in plain language. It builds on your actual canvas, so you can still test and edit every step. For a longer investigation into a flagged site, the weekly workflow can hand off to an AI agent built with Agent Max.

The schedule, the file and the log are what make this an agent, not a chat.

The expression and the time zone travel together. Get one of them wrong and the brief arrives at the wrong hour.
Test it, ship it and wait for Monday once
Run the workflow from Workflow Testing with last weekโs data, or with a fixture that looks like it.
Confirm the brief only uses numbers from the table, the file is stored, and the week row is written.
Run it again for the same week and confirm you do not get a second brief.
Click Ship. For the first production Monday, be around to open the log after 6am and read the brief as the ops team will.
If the run time is wrong, check the time zone on the trigger before you touch the expression.
Open the logging panel at the bottom of the workspace to see what happened. You can switch from the Workflow view to the Node view to read the logs for a single step, and test runs show live logs as they happen. Production logs usually show up within about 45 seconds, and the refresh icon loads them straight away. To add your own messages, use the Log Message to Console node, or call logging.log inside any nodeโs code.
See the logging docs and the node failure docs for retries. Use version history before you change a live brief prompt or the date-window logic.
If a Monday run fails, fix it and run the workflow by hand for that week, then leave the schedule in place for the next one. Do not silently skip a week of meter data. If the brief is late, say so at the top of the file, with the window you actually used, so nobody treats a mid-morning rerun as the 6am picture of the week.
Built for teams that run this in production
A brief that people read every Monday becomes part of the meeting, so a few things matter beyond the first test:
Full code access. Open any node to read or change its JavaScript or TypeScript, especially the date-window and flag rules.
Team access control. Role-based access lets you decide who can view a workflow, who can edit it and who can ship it.
Your own Google Cloud. Workflows run on Google Cloud, and you can run them in your own Google Cloud project as an enterprise option. The schedule itself is a Cloud Scheduler job in the workspace region.
A log per week. When someone asks why a site was flagged, you can open the run and see the table, the flags and the brief that went out.
If you later need the same agent to start from a meter alert as well as from the clock, add a second trigger to a different workflow, or keep the Monday job and give the alert its own listener. Do not turn this cron into a tight poll of the same events.
FAQ
Can I trigger an AI agent with a cron schedule?
Yes. Add the Custom Schedule (Cron) trigger, set the expression and time zone, and click Connect. The workflow starts at that time, and an AI node can write a brief or a digest from data your other nodes have already pulled.
What expression do I use for Monday at 6am?
0 6 * * 1, with the Time Zone set to the zone your team uses. In this guide that is Australia/Sydney. The 6 is the hour in that zone.
Why not poll a database with cron instead?
If the database can tell you that a row changed, a database trigger is the better start. Cron is for work that should happen at a time of day, such as a weekly brief. That distinction is the point of Why AI Agents Need Listeners, Not Cron Jobs.
Can I use Get Data with this trigger?
No. Schedule triggers do not support Get Data, and they have no input or output mapping. Test the workflow from Workflow Testing in the Build tab, and let a scheduled run confirm the clock.
How is this different from the Scheduled Interval trigger?
The Custom Schedule (Cron) trigger uses a cron expression and a time zone, so you can say โMonday at 6amโ. The Scheduled Interval trigger repeats every N seconds, minutes or hours. Use interval when you need a regular tick, not a time of day.
How much does it cost to try?
BuildShip plans start with a 7-day trial, and a card is required to start it. See the pricing page for plans and credits.
Start building
Start your 7-day trial (a card is required), add the Custom Schedule (Cron) trigger, and test a brief against last weekโs data. If you are building ops agents for a larger team, talk to us about enterprise.





