Cron Scheduler Workflow [free]
@ncpenn
code:
data:privatelast updated:5 years ago
@ncpenn/
Cron Scheduler Workflow [free]

Overview

Cron is a tool that allows you to run anything on a schedule. Typically, you specify what you want to run, and when you want to run it, and cron takes care of the rest.

Pipedream's Cron Scheduler supports simple time triggers (such as every minute, hour or day) or advanced cron expressions.

Capabilities

Pipedream allows you to execute any Node.js code and/or send an HTTP request whenever your scheduled job runs.

Quickstart

Example Workflows Using Cron Scheduler

Crontab syntax

We recommend using Crontab.guru which is a simple editor for cron schedule expressions by Cronitor.

A CRON expression is a string representing the schedule for a particular command to execute. The parts of a CRON schedule are as follows:

*    *    *    *    *
-    -    -    -    -
|    |    |    |    |
|    |    |    |    |    
|    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)
|    |    |    +---------- month (1 - 12)
|    |    +--------------- day of month (1 - 31)
|    +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)

Each of the parts supports wildcards (*), ranges (2-5) and lists (2,5,6,11).

Usage Tips

  • All pipeline code on Pipedream is public and run on every event. All event data is private.
  • Send data to Airtable, S3, Snowflake or HTTP out using code actions.
  • Event data is accessible in the $event object — add, update, or delete properties of this object in code.
  • Use $end() to stop your workflow or $respond to return a response to the client.
  • Most of NPM’s 400,000 packages are available for use — just require() them.
  • Store API keys or secrets as environment variables and access via process.env.KEY_NAME.
  • await the execution of async code with Promises, using async / await.
  • You need to await the execution of async code with Promises, using async / awaitlearn more here