Unable to trigger manual cron run
efstajas
PROOP

a year ago

I have a script with a cron schedule set up and would like to trigger a manual execution, but everytime I click "Run now" it just says "Failed to invoke cron execution". What can I do?

Solved

16 Replies

efstajas
PROOP

a year ago

56cafcfa-394c-46c9-a811-dc3207bad3dc


efstajas
PROOP

a year ago

The automatic scheduled invocation worked fine yesterday btw so I don't think it's a problem with the script itself.


brody
EMPLOYEE

a year ago

can you send the cron expression you have set in your service settings please


efstajas
PROOP

a year ago

@Brody 0 2 * * 4L


brody
EMPLOYEE

a year ago

can you try a simpler cron expression?


efstajas
PROOP

a year ago

Yep, changed it to 0 2 * * 4 temporarily, and was able to start a manual run. After I changed it back to 0 2 * * 4L, starting another manual run immediately didn't work anymore. So seems like the L is the culprit. Though the automatic scheduled runs seem to be working fine even with it, it's just manual runs that don't work. But we have a workaround for now, thanks ✌️


efstajas
PROOP

a year ago

This might be unrelated but something else seems to be buggy about editing cron schedules…

When I changed it back to 0 2 * * 4L, it showed the "Applying changes" spinner, even when the change was already applied, at least according to the UI (the new schedule showed in settings and on the "Cron Runs" tab). The spinner persisted though for over 5 minutes, even through a reload.

Then, the spinner eventually disappeared and it went back to the "Apply 1 change" prompt, which shows a diff where both sides are equal (see screenshot). Clicking apply changes does the same thing — spinner for about 5 minutes, never finishes, shows Apply 1 Change prompt again. When I discard the meaningless change everything is fine.

1322325383995199500


brody
EMPLOYEE

a year ago

don't think that has much to do with the cron expression specifically, you maybe have simply applied the change at the exact time we pushed some new code to backend or something


efstajas
PROOP

a year ago

Idk, just tried changing the schedule again just now, and the same thing is happening 🤷

But it's secondary anyway. Can you confirm the problem with not being able to start manual runs? It's 100% reproducible for us — if there's an L in the schedule, can't invoke a manual run.


adam
MODERATOR

a year ago

Looks to me like that’s not a valid cron string


adam
MODERATOR

a year ago

1323334813012328400


adam
MODERATOR

a year ago

what is your goal with this string?


efstajas
PROOP

a year ago

Hey @Adam, the L is a non-standard character that allows for "last x-day of the month" expressions. We need this script to run every last Thursday of every month, and we were happy to discover that the Railway scheduler supports it. As you can see, it's accepted by the schedule field and also gets parsed correctly (it says "At 2 AM, on the last thursday of the month" in my first screenshot).

As I already mentioned the actual automatic runs with this cron work fine, it's just starting a manual run that's broken.


adam
MODERATOR

a year ago

Understood, though it seems like Railway's scheduler doesn't 100% support it. Could you open a <#1157406325593096264> post for this? This seems like a bug.

Sounds like you have a workaround which is great, I'll close this thread unless you have any further questions


efstajas
PROOP

a year ago

Will do 👌


adam
MODERATOR

a year ago

!s


Status changed to Solved adam 11 months ago


Loading...