Skip to content

Question: What kind of cron flavor is used? #2990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kris9854 opened this issue May 2, 2025 · 3 comments
Open

Question: What kind of cron flavor is used? #2990

kris9854 opened this issue May 2, 2025 · 3 comments
Assignees
Milestone

Comments

@kris9854
Copy link

kris9854 commented May 2, 2025

Question

Any one know what kind of cron implementation is used by semaphore UI?

Want to schedule somehting for tue if it falls between the 15-21 at 12 o clock.

Image

I know that if it is utc time i need to say at 0 10.
But it kinda weird that 0 12 15-21 * 2 doesn't work. Also tried using the timer format:

Tue *-*-15..21 12:00:00


Related to

Service (scheduled tasks, alerts)

@fiftin
Copy link
Collaborator

fiftin commented May 2, 2025

Hi @kris9854
Package https://github.com/robfig/cron used for Schedules on backend and https://www.npmjs.com/package/cron-parser for frontend.

@kris9854
Copy link
Author

kris9854 commented May 4, 2025

@fiftin thanks.
Soo i can't do it like i want :/
Do you maybe have an idear on how to go around it? Wrapper bash script that just calls a integration to start the template job?

Want to schedule a playbook to run on the 3th of tuesday in every month :)

@fiftin fiftin self-assigned this May 4, 2025
@fiftin
Copy link
Collaborator

fiftin commented May 4, 2025

Hi @kris9854

  1. robfig/cron understands this expression 0 12 15-21 * 2, so it should works. I will try to reproduce the issue.

  2. I will remove npm package cron-parser and add API endpoint to calculate next run time on backend.

@fiftin fiftin added this to the 2.14 milestone May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants