Skip to content

Automate a recurring report

A scheduled job turns a task you would run by hand into one that runs on its own. On every run, a background agent receives a new task, does the work in your account, and records the result. Nobody needs to be at the keyboard, so this is how a daily health check or a weekly cost review becomes routine.

You get: a job that runs on a schedule, a task for every run, and results you can read in the web app or from the CLI.

Time: about 10 minutes.

  • You finished Run your first task, and your workspace has a background agent (Option B in that guide). A scheduled job always runs as an agent, never as a person.
  • Your agent is opened in the project’s repository folder.
Using the StratoNext skill, create a scheduled job in this project that runs every weekday at 08:00 UTC, assigned to our background agent. Each run should check the production deployment for the last 24 hours: firing signals, errors, failed deployments, and unusual cost, and finish with a short summary and a list of action items. It must only read, never change anything.
Show me the job before creating it, then trigger one run now so I can see the result.

The agent runs every step below for you. Nothing here is for you to type. Expand a step to see examples of the commands it might run. The exact calls depend on what it finds in your setup.

1. Finds the agent that will run the job.

Example commands the agent might run
Terminal window
stratonext agent list

2. Creates the job. The schedule is a standard cron expression in UTC.

Example commands the agent might run
Terminal window
stratonext job create --target PROJECT --name "Daily health check" --agent-id <agent_id> \
--schedule "0 8 * * 1-5" \
--description "Daily health check of the production deployment" \
--instructions "Check the last 24 hours: firing signals, errors, failed deployments, unusual cost. Read only. End with a summary and action items."

3. Runs it once now, outside the schedule, so you see a result today:

Example commands the agent might run
Terminal window
stratonext job trigger <job_id>
stratonext job runs list <job_id>

Each run is a task. Follow it like any other:

Example commands the agent might run
Terminal window
stratonext task get <task_id>
Terminal window
stratonext job list
stratonext job update <job_id> --schedule "0 7 * * *" # change the schedule
stratonext job pause <job_id> # stop future runs
stratonext job resume <job_id>

Pausing leaves a run that is already in progress alone.

Job Schedule
Daily ops journal of what happened to a deployment Every morning
Weekly cost and savings digest Monday morning
Weekly drift check against the deployment definition Once a week
Check that every function and queue has an alarm, and register new ones as signals Once a week

The ready-made prompts include full instructions for the first three.

Try the ready-made prompts for daily journals, drift reports, and cost digests.