Appearance
Scheduling Automation
Once you have built a workflow that works well, you can schedule it to run automatically. Pencel supports time-based schedules using cron expressions, as well as event-driven triggers through hooks. This guide covers both.
Setting up a scheduled workflow
1. Open the workflow
Navigate to Workflows in the left sidebar and click on the workflow you want to schedule. Make sure the workflow status is Active — draft workflows cannot be scheduled.
2. Open trigger settings
In the workflow editor, find the Trigger section. By default, a new workflow is set to Manual, meaning it only runs when you click the Run button.
3. Switch to Schedule
Change the trigger type from Manual to Schedule. This reveals the scheduling options:
- Cron expression — Defines when and how often the workflow runs.
- Timezone — The timezone used to interpret the schedule.
- Enabled — A toggle to pause and resume the schedule without deleting it.
4. Enter a cron expression
Cron expressions follow a five-field format: minute hour day-of-month month day-of-week. Here are common examples:
| Schedule | Cron expression | When it runs |
|---|---|---|
| Every weekday at 9 AM | 0 9 * * 1-5 | Monday through Friday at 9:00 AM |
| Every Monday at 8 AM | 0 8 * * 1 | Monday at 8:00 AM |
| First day of every month at 6 AM | 0 6 1 * * | 1st of each month at 6:00 AM |
| Every hour during business hours | 0 9-17 * * 1-5 | Top of each hour, 9 AM to 5 PM, weekdays |
| Every 15 minutes | */15 * * * * | At :00, :15, :30, and :45 past every hour |
| Every day at midnight | 0 0 * * * | Daily at 12:00 AM |
| Every Sunday at 10 PM | 0 22 * * 0 | Sunday at 10:00 PM |
TIP
If you are new to cron expressions, start with one of the examples above and adjust the numbers. The five fields are always in the same order: minute, hour, day of month, month, day of week.
5. Set the timezone
Choose the timezone that matches your business operations. All scheduled times are interpreted in this timezone, including adjustments for daylight saving time.
6. Enable the schedule
Toggle the Enabled switch to on. The workflow is now scheduled. You see a confirmation showing the next scheduled run time.
7. Save the workflow
Click Save to persist your changes. The scheduler picks up the new schedule immediately.
WARNING
If your workflow has Approval Required turned on, scheduled runs will pause at each step and wait for your approval. This can cause runs to pile up if nobody is reviewing them. For fully automated schedules, consider turning approval off or setting individual steps to auto-approve.
Monitoring scheduled tasks
All scheduled tasks — both recurring and one-off — are visible in one place: the Tasks > Scheduled tab. From there you can:
- See upcoming firings grouped by time (Today, Tomorrow, This Week, Later)
- Toggle a recurring schedule on/off
- Trigger an immediate "Run now"
- Jump to the task detail for editing
Pausing and resuming a schedule
To temporarily stop a schedule without deleting it:
- Open the workflow or task.
- In the Trigger/Schedule section, toggle Enabled (or the Active switch in the Scheduled tab) to off.
- Save.
The schedule configuration is preserved. Toggle it back on whenever you are ready to resume.
Event-driven triggers with hooks
Hooks let you trigger workflows in response to workspace events rather than on a fixed schedule. For example, you might want a workflow to run whenever a new artifact is created, or when another workflow finishes.
Creating a hook
- Navigate to the Automations section in the left sidebar (or open a workflow and click into its Trigger settings to create a workflow-scoped hook).
- Click New Automation.
- Fill in the fields:
- Name — A descriptive label, such as "Run cleanup after weekly report."
- Trigger — What fires this automation. Choose from:
- Schedule — A cron expression plus timezone (same as the workflow schedule described above).
- Event — A workspace event. Common events include:
run.completed— A workflow run finished successfully.run.failed— A workflow run failed.artifact.created— A new artifact was saved.artifact.updated— An existing artifact was updated.chat.turn_completed— A chat conversation turn finished.memory.saved— A new memory item was captured.todo.created— A new todo was created.todo.updated— A todo was updated.connection.connected— A connection was established.connection.disconnected— A connection was lost.
- Conditions (optional) — Filter which events fire the automation. For example, only fire when a specific workflow's run completes.
- Action — What to do when the trigger fires. Two options:
- Run Workflow — Execute an existing workflow. Choose the target workflow from the list.
- Run Instruction — Run a one-off instruction without a saved workflow. Type the instruction in plain language and optionally assign an agent. Use this for lightweight, simple tasks that don't warrant a full workflow — for example, "Send a Slack message to #alerts summarizing any failed runs from the past hour."
- Toggle the automation to Active.
- Save.
INFO
Automations run asynchronously. When the trigger fires, Pencel queues the action and starts it in the background. You can monitor it on the Jobs page (/jobs) like any other run.
When to use Run Instruction vs. Run Workflow
| Use case | Which action |
|---|---|
| Trigger an existing multi-step workflow | Run Workflow |
| One-off task that doesn't need to be reusable | Run Instruction |
| Quick notification or alert | Run Instruction |
| Repeatable workflow you will refine over time | Run Workflow |
Run Instruction is a shortcut — you skip the workflow creation step and type the task directly into the automation. If the task grows complex or you find yourself repeating it, promote it to a proper workflow.
Example: Chain two workflows
Suppose you have a "Collect Data" workflow and a "Generate Report" workflow. You want the report to run automatically after data collection finishes:
- Create an automation named "Auto-generate report after data collection."
- Set the trigger to Event →
run.completed. - Add a condition: only fire when the completed run belongs to the "Collect Data" workflow.
- Set the action to Run Workflow → "Generate Report."
Now every time Collect Data finishes successfully, the report generation starts automatically.
Example: Lightweight Slack alert on run failure
If you just want a Slack notification when something goes wrong — without building a full workflow for it:
- Create an automation named "Alert on run failure."
- Set the trigger to Event →
run.failed. - Leave conditions empty (fires on any failure).
- Set the action to Run Instruction: "Send a Slack message to #alerts saying that a workflow run failed. Include the workflow name and time of failure."
- Assign it to an agent that has the Slack connection enabled.
- Toggle Active and save.
Now any failed run triggers an automatic Slack ping — no workflow needed.
Monitoring scheduled runs
All scheduled and hook-triggered runs appear on the Jobs page (/jobs).
- Queued — The run is waiting to start.
- Running — The workflow is actively executing.
- Completed — The run finished successfully.
- Failed — Something went wrong. Click the run to inspect the error.
You can filter runs by workflow name, status, or date range to quickly find what you are looking for. See Monitoring Runs for a detailed walkthrough.
Tips for reliable automation
- Start with a manual test. Run the workflow manually at least once before scheduling it. Confirm that it produces the expected output.
- Use conservative schedules at first. Start with a weekly run. Once you trust the output, increase the frequency.
- Check the run's event log. If a scheduled run behaves unexpectedly, the run's event log on the Jobs page shows exactly what the agent did and why.
- Combine schedules and hooks. Use a schedule for the primary workflow and hooks for follow-up actions. This keeps each workflow focused on one job.
- Monitor costs. Frequent schedules consume more tokens. Check the Cost & Usage section in Settings to track spending over time.
Next steps
- Monitoring Runs — Learn how to inspect run details, approve steps, and respond to agent questions.
- Building a Workflow — Refine your workflow's instructions before scheduling.
- Writing Guidelines — Add guardrails that apply every time the scheduled workflow runs.
