Scheduled tasks & automation

Run your app's logic on a cron schedule or at a one-shot future time

Overview

Your app can run logic on a schedule — every minute, every hour, every Monday at 9am, or once at a specific future date/time. Scheduled tasks power automation: nightly digests, weekly reports, drip campaigns, automated LinkedIn posts, recurring data syncs, and more.

What it supports

  • Cron schedules — recurring tasks at fixed intervals or specific times (every Monday 9am, daily at midnight, every 5 minutes, etc.)
  • One-shot schedules — fire once at a specific future time (e.g., "send this reminder in 30 days")
  • Bound to a function — each schedule calls a server-side function in your app, so the work runs securely without depending on a user's browser being open
  • Per-tenant scheduling — schedules can be parameterised per user/row so each customer has their own cadence
  • Multi-replica safe — even when the platform runs multiple worker replicas, each scheduled tick fires exactly once
  • Composable — schedules can call into AI features, email, image generation, LinkedIn, and any other integration

Example prompts

"Every Monday at 9am, generate a summary of last week's
sales and email it to me."

"Auto-publish a LinkedIn post every weekday at 10am with
a quote from my saved drafts."

"30 days after a trial starts, email the customer a renewal
reminder."

"Once an hour, fetch the latest exchange rates and update
my pricing table."

Setup (none required)

Scheduled tasks are fully managed by Pentoggle. No cron jobs to host, no worker queues to provision, no leader-election to debug. Describe the schedule and what should run, and the agent wires up the function and registers the schedule.

Fully managed: The platform fires scheduled tasks for you with multi-replica safety — you never need to set up cron infrastructure or worry about a missed tick.

How it works

  1. You describe a schedule in chat (e.g., "every Monday at 9am, generate a weekly digest")
  2. The agent creates a server-side function for the work and registers a cron or one-shot schedule pointing at it
  3. At each scheduled tick, the platform's scheduler acquires a lock so only one replica runs the function
  4. The function runs server-side with your app's database, storage, and integrations available — exactly like a function called from a button click
  5. Output (emails sent, rows written, LinkedIn posts published, etc.) is committed; the next tick is scheduled
  6. If a tick fails, the platform retries with backoff and surfaces the failure in your app's logs

Composing with other integrations

Scheduled tasks become genuinely powerful when combined with other integrations:

  • LinkedIn + scheduler → auto-publish a daily post
  • AI features + scheduler → generate a weekly recap with AI, then email it
  • Image generation + scheduler → generate fresh hero art every morning
  • External APIs + scheduler → sync data from a third-party every hour

Limitations

  • Minimum interval — recurring schedules can't fire more often than every 1 minute
  • Server-side only — schedules call server functions; they can't drive browser-side UI directly
  • Soft execution windows — exact tick time may drift by a few seconds under heavy load (still exactly once, just slightly delayed)
  • Counts against live capacity — every tick uses live app capacity, so very high-frequency schedules show up in your usage dashboard
  • One-shot schedules are absolute — once registered, "in 30 days" becomes a fixed UTC timestamp; you can cancel but not "pause"

Troubleshooting

  • Schedule isn't firing — confirm it's actually registered by asking the agent "list all scheduled tasks"; if it isn't listed, the schedule was never created and needs to be re-requested
  • Fired twice — extremely rare; usually means two different schedules were registered for the same logic. List them and remove the duplicate
  • Function fails silently — check the activity log for the function; uncaught errors are logged with stack traces. Ask the agent to "add error handling and notify me when the weekly digest fails"
  • Wrong timezone — schedules run in UTC by default. Tell the agent the timezone you want (e.g., "run the digest at 9am Asia/Kolkata") and it converts
  • Need to pause a schedule — ask the agent to disable or remove the schedule by name; there's no admin UI toggle today