Unable to set Cron hash for day of week

Hi,

The UI displays the correct schedule when using the hash for day-of-week.

However, I cannot save the schedule, and pushing via blueprint causes the blueprint to fail.

Failed to parse int from 3#1: strconv.Atoi: parsing "3#1": invalid syntax

There are a lot of “bespoke” additions in Cron implementations that we don’t support. The rule of thumb are, given the reference that Cron configurations link to ( cron - Wikipedia ), if anything works “only in some implementations”, it probably doesn’t work on Render.

There are two alternatives here:

  • Don’t rely on Cron, set up a worker (or leverage a worker service you already have, Celery, Sidekiq, etc.) and some other system to enqueue the job to run on that first Wednesday of the month for the worker to process.
  • Add logic into the process being run to check for “first Wednesday of the month”. Exit if it isn’t, continue if it is, leaving the cron expression as 0 8 * * 3.

Thanks Jason.

I expected the bespoke addition to Cron to work only because the web UI said it would. It’s probably worthwhile to have the web UI display an error if the cron configuration is not supported.

We’ll set it up with celery instead.

Yeah, sorry about that. We’ve seen that discrepancy a few times. I’m unsure what Cron implementation we use under the hood, but it is disconnected from the expression parser the Dashboard uses, as is evidenced here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.