Skip to content

Instantly share code, notes, and snippets.

@tridungle
Created May 20, 2021 06:21
Show Gist options
  • Save tridungle/a2017111548757dc3b25a387dd4fc8f3 to your computer and use it in GitHub Desktop.
Save tridungle/a2017111548757dc3b25a387dd4fc8f3 to your computer and use it in GitHub Desktop.
The simplest way to run Node.js code on a schedule

In the era of the cloud, it’s also outdated. Cron jobs are simple only if you cut your teeth on Linux and can effectively administer a server. This is an inaccessible option for many modern devs who operate far up the stack.

So it’s no surprise that we have other choices for scheduling code in 2020:

AWS Lambda + CloudWatch Events
Google Cloud Scheduler
Airflow
Kubernetes CronJobs
ECS Tasks
etc.

These options work well in their intended context: Lambda is great when you’re glueing together AWS resources. Kubernetes CronJobs or ECS Tasks are ideal when your code runs in a container. Airflow is great when you have complex dependencies between jobs, for example in data pipelines.

But when you just want to run a script on a schedule, they’re overkill. Enter Pipedream

Pipedream is an integration platform for developers. You run serverless workflows - any Node.js code - triggered by HTTP requests, timers, emails, and more. You can also use pre-built actions to connect to hundreds of APIs and apps - actions are just Node functions that perform common operations against these APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment