Workflows

How to run a workflow on a schedule

How to run a workflow on a schedule

In TeleportHQ, a scheduled workflow runs by itself at set times, for example every morning at 9 AM, without anyone visiting your site. To make one, replace the workflow's trigger with Scheduled (Cron), choose a schedule and a timezone, add the steps, then publish your site. Scheduled workflows run on the server and work on the Trial, Pro and Premium plans.

Before you start

  • Plan: scheduled workflows work on Trial, Pro and Premium. The Scheduled category always carries a PRO badge in the trigger menu, whatever your plan. It only stops you, with the message Paid plan required, once your trial or subscription has ended. See What's the difference between Trial, Pro and Premium?.
  • Web app: workflows are a web app feature. On a website, creating a workflow first asks you to enable web app features. See What are workflows?.
  • Publishing: a scheduled workflow only runs on a published site. It doesn't run in the editor or in the preview.
  • Web app slot: your web app must be covered by your plan or a web app slot. Scheduled workflows stop when an uncovered web app passes its 7-day window. See Why does my web app need a slot?.

Steps

This example emails a bakery owner a list of today's cake orders every morning.

1. Set the schedule

  1. In the left sidebar, click Workflows, then click + (Add Workflow) to create a workflow. Name it, for example Morning order summary.
  2. On the canvas, right-click the Page is Loaded trigger and choose Replace node type.

    The TeleportHQ Replace Node Type menu with the Scheduled category highlighted
  3. Point at Scheduled, then click Scheduled (Cron) in the list beside the menu.
  4. Click the new trigger. In the right panel, under Schedule, click a preset, for example Daily at 9 AM. The presets go from Every minute to Monthly (1st). You can also type a cron expression, for example 0 9 * * 1-5 for 9 AM on weekdays.
  5. Point at the Schedule field to read the plain-language preview under This workflow will run:.
  6. Under Timezone, choose your timezone, for example Europe/London (UTC+0/+1). The default is UTC (+0).

2. Add the steps

  1. Click the round + under the trigger (Add node).
  2. Add Select Data from the Data category and choose your orders table. See How to save, update or delete database records with a workflow.
  3. Add a Send Email step after it and set it up. See How to send emails and text messages from a workflow.

3. Publish

  1. Publish your site. See How to publish a web app.
  2. Open the trigger again. The Deployment Required notice is replaced by Project Deployed: "Your project is deployed. This cron workflow will execute automatically at the scheduled times once saved."

Check that it worked

  • The workflow's card in the Workflows panel shows a Cron badge.
  • The trigger's Endpoint field shows the address the scheduler calls on your published site ("The route the scheduler requests on your published project"), with a copy button (tooltip Copy endpoint URL).
  • Wait for the next scheduled time and check the result, for example the email in your inbox.
  • To check a step without waiting, test it in the editor. See How to test a workflow step.

TeleportHQ has no log of past runs for scheduled workflows, so you can't see when a scheduled workflow ran or whether it failed. The Test runs tab only lists tests you ran in the editor. To check a live run, look at its result, for example the email or the updated record.

Troubleshooting

The Scheduled category shows "Paid plan required" Your trial or subscription has ended. Click Upgrade to a paid plan, or see What's the difference between Trial, Pro and Premium?.

"Cron workflows run on the server and cannot use client-side nodes" Scheduled workflows have no visitor, so steps from Navigation, Element, Forms, URL, State, Browser, Storage, Audio and Toast can't be used. Use server steps such as Data, Email, HTTP Request or Integrations.

"Remove client-side nodes before switching to a scheduled trigger" or Cannot Switch to Cron Trigger The workflow already has browser-only steps. Delete them, then replace the trigger again.

"These steps need a browser, and this workflow runs on a schedule on the server." You tried to paste browser-only steps into a scheduled workflow. Paste server steps only.

The trigger shows "Enter a valid cron expression to see when this workflow will run" The expression isn't valid. Use five parts separated by spaces (minute, hour, day, month, weekday), or click a preset.

My scheduled workflow never runs Check that you published after your last change, that the workflow card has no Disabled or Not exported badge, and that the web app is covered by a slot or your plan. For a full checklist, see Why isn't my workflow running?.

Good to know

  • After changing a scheduled workflow, publish again. The Endpoint field says: "Published on every deploy. Republish the project after changing this workflow."
  • Times follow the Timezone you choose, not your visitors' local time.
  • Very frequent schedules, such as every minute, may slow down your site's server.
  • Make sure the workflow can't loop forever, and add steps to the Workflow Error box to handle failures.
Share

Related Articles

What are workflows?

A workflow in TeleportHQ is a visual recipe that makes your web app do something, one trigger (like a button click or a form submission) followed by steps (like saving to a database, sending an email or opening a page), built without writing code; adding one makes a website a web app.

How to create a workflow

In TeleportHQ, open the Workflows panel in the editor's left sidebar, click Add Workflow, replace the starting trigger with the one you need, then add and set up each step on the workflow canvas; copy, paste and tidy steps from the canvas.

How to start a workflow from a webhook

In TeleportHQ, replace a workflow's trigger with Webhook Received, copy its endpoint URL, publish your site, and paste the URL into the other service (for example Stripe, Zapier or Typeform) so its requests start the workflow on your server.

How to send emails and text messages from a workflow

In a TeleportHQ workflow, add a Send Email step (SendGrid, Mailgun, Mailersend, Postmark or Resend) or a Send SMS step (Twilio, TextMagic, Infobip or SMSAPI), enter your provider's API key, then fill in the sender, recipient and message; the provider you set up becomes the project's provider.

Why does my web app need a slot, and what is the 7-day window?

In TeleportHQ, each web app needs its own Web App slot to keep publishing and running; a web app without one gets 7 days of full access with a watermark, then its site goes offline and it is archived until you add a slot, and it is never deleted.

How to publish a web app

You publish a TeleportHQ web app like a website, with Publish → Publish to Production; a web app not covered by a Web App slot can publish with a TeleportHQ watermark for 7 days, after which it needs a slot to stay online.