automation.
Before you start
- You have an agent in your workspace. See Create an agent.
- For the CLI tab, you have signed in with
pinework login. - You know when the routine should run, as a time of day or a 5-field cron expression.
Create the routine
1
Write the routine
- Dashboard
- CLI
- Open Automations in the sidebar.
- In the Routines section, click New routine.
- Enter a Name.
- Under Runs, keep Schedule selected.
- Pick how often: Every hour, Every day, Weekdays, Every week or Every month.
- Set the time of day, except for Every hour. Set the timezone. It starts as your browser’s timezone.
- In What to do, write the prompt the agent gets on each run.
- Pick the Agent.
- Optional: set Runs on to Cloud or Device, and pick a Model. Both default to the agent’s own setting.
- Click Create routine.
30 8 * * 1-5.id starts with aut_ and its status is active.2
Run it once now
Test the prompt without waiting for the schedule.When it works, the dashboard shows a toast that the run started, with an Open run link. The CLI prints
- Dashboard
- CLI
Open the routine’s More actions menu and click Run now. The routine’s own page also has a Run now button.
"kind": "triggered" and the new runId.3
Read the result
When the run ends, the agent’s final reply appears as a message in a direct message with the agent. The direct message belongs to the person who created the routine. If an agent created the routine, the reply goes to the company owner. A run that ends with an empty reply posts nothing.Open the routine from Automations to see its Run history. Each row shows the run, its status, what started it and when. The cards at the top count successful, failed and total runs over 7 days.
Change, pause or stop a routine
- Dashboard
- CLI
- To change it, open its More actions menu and click Edit. Changes apply from the next run.
- To pause it, turn off its switch in the Routines list, or click Pause on its page. Turn the switch on or click Resume to restart it.
- To stop it for good, click Archive. Pinework archives routines and never deletes them. Click Unarchive to bring one back.
- To copy it, click Duplicate.
Start a routine from an event instead
A routine can also start on an event rather than a clock.- On a GitHub pull request: pick GitHub under Runs in the dashboard, or pass
--event pr-mergedor--event pr-checks-passedwith--repo owner/name. Your workspace needs GitHub connected first. See Connect GitHub. - On an HTTP POST from your own system: see Start a run from a webhook.
Fix a routine that does not start
Run now says the run was skipped because one is in progress
Run now says the run was skipped because one is in progress
A scheduled tick or Run now is skipped while the routine’s last run is still queued or running. The skipped tick is not queued for later. Wait for the run to end, or cancel it with
pinework run cancel <run_id>.Run now says the automation is not active
Run now says the automation is not active
A paused or archived routine does not start runs, from the schedule or by hand. Resume or unarchive it first.
The form says the cron must be a 5-field expression
The form says the cron must be a 5-field expression
Pinework takes standard cron with minute, hour, day of month, month and day of week. It has no seconds field.
0 9 * * 1-5 means 09:00 on weekdays.The CLI says --agent me needs an agent id
The CLI says --agent me needs an agent id
--agent me works only when an agent runs the command. Pass the agent’s agt_ id or @handle instead.Start a run from a webhook
Start a routine’s run with a POST from your own system.
Runs
What a run is and how to read its trace.
Cloud and device
Choose where each routine run happens.
Run a workflow
Run several agent steps in order and watch each one.