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
Crontabs with ranges fail to parse in uwsgi #331
Labels
Comments
This issue is stale because it has been open for 90 days with no activity. |
go ahead and close this. |
I think there are three actions required:
|
Yeah, I just got bitten by this too. I'm going to see if I can review the docs |
Would a summary of the limitation be enough and a workaround for the docs? |
I think that makes sense at least in the short term. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tl;dr: we should probably mention in the docs that uwsgi doesn't support ranges (and check exactly what it does support).
Discussed in #330
Originally posted by jfmatth October 5, 2023
Noticed that my cron line isn't being picked up correctly by Piku, and not being the crontab guru, hoping to find out if i'm right?
current
git push output from piku
Seems to only be picking up the cron.1 | [uwsgi-cron] command "1-5 ./bin/cron_job.sh" registered as cron task schedule?
Looking at the regex defined in piku.py
Thoughts?
I'm trying to have the job run from 6am to 1pm every minute M-F, if my crontab is wrong, let me know too.
shelling into the app, i see the uwsgi line is
Updates
After troubleshooting a lot, don't know why the jobs aren't running like they should
issue 1 - UTC counts, so I changed the job to run on UTC time, not local, so changed to run UTC, for just one hour and it works.
issue 2 - doesn't seem to like ranges?
This doesn't work for whatever reason, although UWSGI see's it OK according to the file and the docs
Really need ranges to work, but not sure what I'm doing wrong :(
Updates 2
OK, digging into the UWSGI C code, looks like they only support INT's on hours, so my guess is they are expecting a single number, uggh.
I'll assume that's the case, and create multiple cron jobs and see how that goes, uggh
Final solution
Just in case anyone else run's into this...
Kudo's to the Piku team for sending my cron string over to UWSGI, but unfortunately, UWSGI doesn't provide full crontab regex, which is fine. I ended up using Python's APSCHEDULER.
APscheduler is an amazing library, and even has a 3rd party add-on for Django. With a little work in apscheduler, I used their
from_crontab
trigger type:This worked like I needed it to.
I
The text was updated successfully, but these errors were encountered: