Cron Jobs Overview

m18t ships a native scheduler: write a cron expression, point it at an internal task or an external workflow, and inspect every run.

What you'll learn

  • What cron jobs do in m18t and the two kinds of thing they can trigger: an internal TASK or an external WORKFLOW.
  • How to schedule, run, and inspect a job, including its run history.
  • How cron relates to scheduled publishing, which rides its own queue.

Why m18t has its own scheduler

Plenty of background work in m18t benefits from running on a clock rather than a click: polling news sources, refreshing social engagement metrics, periodic maintenance. Rather than push all of that to a third-party automation tool, m18t ships a real internal scheduler. You write a cron expression, point it at an action, and m18t runs it on schedule and logs every run.

A cron job in m18t targets one of two things, set by its trigger type:

  1. TASK — an internal action that runs inside m18t. These are predefined task keys the platform exposes (the job's action dropdown lists the available ones). This is the native path: the work happens in your m18t instance, brand-scoped, logged.
  2. WORKFLOW — an external trigger. Instead of running internal code, the job pings a registered n8n workflow. m18t fires the webhook on schedule; n8n does the rest. This is the bridge to outside automation, and it's the legacy path — for most work, an internal TASK is what you want.

Either way, the schedule, the run history, and the telemetry live in m18t.

How to create a cron job

  1. Open Cron Jobs under Automation (/studio/automations/cron-jobs).
  2. Click New Job.
  3. Pick the brand this job runs for, or choose All brands to run it workspace-wide. This is a deliberate first step — there's no silent default.
  4. Give the job a name and optional description.
  5. Choose the Trigger Type: TASK or WORKFLOW. The Action / Target dropdown then lists internal tasks or registered workflows accordingly.
  6. Enter a cron expression (e.g. 0 */6 * * * for every six hours). There's a link to crontab.guru beside the field if you need to build one.
  7. Optionally add a JSON payload and set a priority.
  8. Make sure Job is Active is on, then Create Job.

How to run, edit, and inspect a job

  • Run now. The play icon on a job runs it immediately and reports success or failure with the duration. Useful for testing a job without waiting for its next scheduled tick.
  • History. The history icon opens an execution log: every run with its status, trigger source (scheduled vs. manual), duration in milliseconds, any error message, and the payload/result. This is where you debug a job that's misbehaving.
  • Edit / pause. Edit a job to change its schedule or target; toggle Active off to pause it without deleting it. A paused job shows as "Paused" in the table.
  • Last run. The table shows each job's last run status and next scheduled run at a glance.

Variations

  • Workspace-wide jobs. A job scoped to "All brands" runs for every brand in your workspace — appropriate for maintenance that isn't brand-specific. Brand-scoped jobs run for just that brand.
  • Manual vs. scheduled runs. Both are logged, and the history tags which was which via the trigger source, so a manual test run is distinguishable from a scheduled one.

Cron and scheduled publishing

A fair question is whether you write a cron job to publish content on a schedule. You do not, and you should not. Scheduled publishing has its own queue: you set a time on the piece, queue the send from its Publishing tab, and it fires at that time on its own, with retries and a guard that marks a badly late slot as missed rather than sending it hours off. See Scheduling vs. Publishing.

That queue is drained by a job that already ships in every workspace and runs every minute, alongside a daily connection health check that flags a dead connection before a send fails on it. You will see both in the jobs table. Leave them alone and they do their work.

So the split is clean. Cron is for work on a clock that is not tied to one piece: polling sources, refreshing metrics, maintenance, pinging an external workflow. Scheduled sends belong to the piece.

FAQ

What's the difference between a TASK and a WORKFLOW job? A TASK runs internal m18t code (a predefined task key); a WORKFLOW pings an external n8n webhook. TASK is the native path; WORKFLOW is the legacy bridge to outside automation.

Can I make m18t publish my content automatically on a schedule? Yes, and not with a cron job you write. Queue the send from the content piece's Publishing tab and it fires at its time on its own. The job that drains that queue already ships in every workspace and runs every minute. See Scheduling vs. Publishing.

Where do I see why a job failed? Open the job's history (the history icon). Each run shows its status, duration, and any error message, plus the payload and result.

How do I test a job without waiting for the schedule? Use the play (Run now) icon. It executes the job immediately and reports success/failure and duration, and the run is logged like any other.

How do I pause a job temporarily? Edit it and turn off Active, or it'll show as Paused. It stops running but is kept so you can re-enable it.

What's next

Was this article helpful?