6
22 Comments

Is there a cron-like service that fits this description?

Hi Everyone,

This is my first question here, hope you all are doing well.

So to describe my question, I am right now getting a couple of projects off ground and I am wondering if there is any service online available which does the following sort of workflow:

  1. Our application sends a request to service with a payload (that may include certain identifiers and CRON like field which will specify the time)
  2. The service acknowledges our request and creates a job (that runs on the schedule specified)
  3. The service invokes a webhook (that we would have specified in step 1 when the job time is reached along with the payload that we sent in step 1).
  4. We have an identifier for each job and We are able to cancel jobs based off certain events.

Example 1:

A new user registers, we send a request to the service with users details and ask the service to call back on a webhook after 7 days.
When 7 days are passed the webhook is invoked by the service with user data so that we can do further actions - like sending a second email to user OR some other stuff.

Example 2:
We ask the service to call back a webhook at fixed intervals (like every 30 days) with some custom payload that we configure when registering the job.

I did look at EasyCron but I don't think that fits the needs.

We could also build something on our own but I am trying to avoid some development effort right now.

Zapier is another option but because of the estimated volumes it is going to cost a lot (I am looking for something cheaper). and also I was not able to find if a zap can be cancelled.

So has anyone of you used such a service, if yes would you recommend anything?

thanks and regards

on November 6, 2020
  1. 2

    Why not just use cron for time-based event scheduling?

    1. 1

      @alchemist @sillycube because we are on a serverless environment (not AWS)

      1. 1

        Most serverless platforms like AWS, DO app platforms, Heroku provide built-in task scheduling features. You can check your service provider

    2. 1

      I was about to ask exactly this! Knowing why you've chosen not to use cron itself is crucial in understanding what you need.

  2. 2

    Hey Jocelyn,

    You can try this out, though I don't think I've seen the option of sending them extra parameters apart from your webhook and the cron time, but maybe that's something you can make a feature request for :)

    https://ralley.io

    1. 2

      thanks, This is exactly matching the requirement.

  3. 1

    Azure functions have Cron events

    1. 1

      Good to know.

  4. 1

    https://ralley.io is awesome. Alternatively you can use this (Node.js): https://github.com/kidGodzilla/webhook-cron-api

    1. 1

      Thanks, I will take a look.

  5. 1

    How about a Cloudwatch Event that triggers a Lambda function? I wrote about how we implemented scheduled tasks for newclick.io.

    Take a look here: https://www.alexdaro.com/writing/scheduling-website-content-with-javascript-and-aws-cloudwatch

  6. 1

    I think pipedream can do what you want, with a generous free tier.
    In any case I would look thoroughly for a 3rd party solution before building something custom. Even if this looks "small" you'll have ongoing investment in features and bug fixes, plus servers costs.

  7. 1

    I don't really think this is what you want to do...

    Web requests have timeout limits and aren't good for processing (what should be a background task). If you only have one hosted web server, imagine if 10 people sign up at once and this cron service makes 10 callback requests at once back to your server, tying up resources that could be serving real users. You could extend the timeout limits to let you do this slow tasks, but again, you tie up resources.

    I think you'd be better off using a background worker system (sidekiq in rails) to schedule jobs (using redis). a background process could pull items off the kew, and process them.

    I guess I could see this being useful for a small startup, but I'd be curious if a larger company would find value in this...

    1. 1

      yes, you are right, building our own queue is something we will eventually do. At the moment we don't have bandwidth to do it so I am looking for something that I can use as a service. In other answers I have got a few suggestions that I am going to look into.

  8. 1

    I can build one for you, using Django.

    1. 1

      hi, please send contact info. thanks.

      1. 1

        You can email me: mike97m at yahoo.com