Cron jobs

Run cron jobs
in your app’s image

Nightly emails, cleanups and syncs, on a schedule in your timezone. Each run gets a fresh container, a timeout and a log.

Job timezoneUTC

    How it works

    How to add a cron job

    On the app’s Crons tab in the dashboard.

    01

    Write the schedule

    Standard five-field cron, with a preview of the next five runs.

    0 7 * * *   Europe/Berlin

    02

    Add the command

    Anything you’d run in your app’s shell, or a curl call.

    node scripts/send-digest.js

    03

    Slasha runs it

    A new container on schedule, with live output. Or press Run now.

    Succeeded · 12.4s · Scheduled

    Schedules

    See what your schedule means

    Type a schedule and see when it runs next, before you save. Lists, ranges and steps all work.

    • Next five runs in the job’s timezone
    • Disable a job without deleting it
    Writing schedules
    Schedule

      Times shown in UTC. Each job picks its own timezone.

      Runtimes

      Use your app’s image, or curl

      The app runtime uses your app’s image, env vars and /data volume. The utility runtime is a small image with curl for calling a URL.

      • Same env vars, including DATABASE_URL
      • Separate from your live app
      • Utility runs get your env vars too
      App vs utility runtime

      app

      npm run cleanup

      • Your app’s image
      • Your env vars
      • /data mounted

      utility

      curl -X POST "$HOOK"

      • Small curl image
      • Your env vars
      • For HTTP calls

      Run history

      See every run and its log

      Each job keeps its last 50 runs with status, duration and the full log. Press Run now to test without waiting.

      • Scheduled and manual runs in one list
      • Logs stream live and are kept
      Run history
      AppsstorefrontCronsnightly-digest
      nightly-digestEnabled Run now

      Schedule

      0 7 * * *

      Every day at 07:00

      Timezone

      Europe/Berlin

      Next run

      Tomorrow, 07:00

      Runtime

      App image

      Command

      node scripts/send-digest.js

      Run history

      SucceededToday, 07:0012.4s
      SucceededYesterday, 07:0011.9s
      SucceededOct 30, 14:2112.1s
      FailedOct 30, 07:003.2s
      SucceededOct 29, 07:0012.7s
      SkippedOct 28, 07:00—

      Limits

      Skip overlapping runs and stop long ones

      If the last run is still going, the next one is skipped. Runs that hit the timeout (one hour by default) are stopped.

      • No overlapping runs
      • Timeout per job
      • Cron Failed alerts for failures and timeouts
      Alerts
      import-catalog · every 15 minutes
      07:00Runningstill importing
      07:15Skippedprevious run still running
      07:30Succeededfinished in 4m 12s
      07:45Timed outstopped at the timeout
      Cron Failed · latest run timed out · sent to #ops

      More details

      Any IANA timezone

      UTC by default. Daylight saving follows the job’s timezone.

      Next runs preview

      See the next five run times before you save.

      Run now

      Start a run by hand without changing the schedule.

      New container each time

      Each run gets its own container, which is removed afterwards.

      Timeouts

      One hour by default, set per job in seconds.

      No overlaps

      If the previous run is still going, the next one is Skipped.

      50 runs of history

      Status, duration, trigger and logs for each.

      Pause any job

      Disable a job and keep its settings.

      Questions about cron jobs

      Have another question? Ask on GitHub.

      Can I manage cron jobs from the CLI?
      Not yet. You create and edit cron jobs in the dashboard, on the app’s Crons tab. Anyone with the App Settings permission on the app can change them.
      Does the job run inside my live web container?
      No. Each run gets its own short-lived container. With the app runtime it uses the image of your running deployment, plus its environment variables and /data volume, so it works like your app but doesn’t slow down live requests. This means the app needs a running deployment for app-runtime jobs.
      What happens if a run takes longer than the interval?
      Slasha marks the next run as Skipped and doesn’t start a second copy. Runs that go past their timeout (one hour by default) are stopped and marked Timed out.
      How do timezones and daylight saving work?
      Each job has its own IANA timezone, UTC by default. The schedule follows that zone, so a job set for 09:00 in Europe/Berlin runs at 09:00 Berlin time all year, including after a daylight saving change.
      Can I call a URL on a schedule?
      Yes. Pick the utility runtime. It’s a small container with curl and your app’s environment variables. Then run something like curl -fsS -X POST https://storefront.ship.acme.dev/tasks/digest.
      Will I find out when a job fails?
      Each run keeps its logs and exit status. Admins can also add a Cron Failed alert to get a Slack, Discord, Telegram or email message when the latest run fails or times out.

      Other features

      All features

      Run your scheduled jobs on Slasha

      Free and open source. Your first app can be live in ten minutes.

      $curl -fsSL https://slasha.com/setup.sh | bash