Skip to content
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

Replace IntervalScheduler with GrocIntervalScheduler #78

Open
irskep opened this issue Feb 3, 2012 · 12 comments
Open

Replace IntervalScheduler with GrocIntervalScheduler #78

irskep opened this issue Feb 3, 2012 · 12 comments

Comments

@irskep
Copy link
Contributor

irskep commented Feb 3, 2012

In order to have jobs run at the top of every hour, and synchronize intervals even in the face of DST, we should hook up groc's IntervalTimeSpecification to our interval scheduler.

@irskep
Copy link
Contributor Author

irskep commented Feb 23, 2012

Just to clarify, this would let us do "every 3 hours between 10AM and 3PM".

@bchess
Copy link
Contributor

bchess commented Feb 23, 2012

+1. This would make it possible to run our hourly batches during the daytime hours.

@irskep
Copy link
Contributor Author

irskep commented Feb 24, 2012

I was blocked on some things today, so I started a branch for this, forking from config_rewrite.

@ghost ghost assigned irskep Feb 24, 2012
@irskep
Copy link
Contributor Author

irskep commented Feb 27, 2012

For reference: GAE cron syntax

@irskep
Copy link
Contributor Author

irskep commented Mar 2, 2012

I was bored after work and wrote a parser for this. No actual scheduler yet.

@irskep
Copy link
Contributor Author

irskep commented Mar 20, 2012

This can be bumped to the next release.

@irskep
Copy link
Contributor Author

irskep commented Apr 3, 2012

I don't know if I'm going to ultimately have time to hook up the parser with the actual IntervalTimeSpecification object. If you want to continue my work, you can look at this branch: https://github.com/irskep/tron/tree/new_interval_scheduler

I can still try to find time to do it in between my other work, I just can't give you a specific delivery date.

@dnephin
Copy link
Contributor

dnephin commented May 19, 2012

I took a look at this again. I noticed that the appengine.cron package has a parser already, and the package is only dependent on core python packages. What do you think about creating a package out of everything under:
http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/cron/. This package would be external to Tron.

That would allow us to create a scheduler which uses this parser/scheduler but would only attempt to import the package when a job is configured to use this scheduler. It would also mean we'd support the full groc syntax.

@irskep
Copy link
Contributor Author

irskep commented May 19, 2012

The parser uses antlr3, which I thought wasn't in the standard library.

@dnephin
Copy link
Contributor

dnephin commented May 19, 2012

Ah, true. I guess I meant that there weren't any other google appengine dependencies. If someone wanted to use the groc scheduler, they'd have to install antlr3 and this new package that we would make.

@irskep
Copy link
Contributor Author

irskep commented May 19, 2012

I'd rather see fewer dependencies.. Besides, the existing daily parser implements most available daily scheduler features, and the other parser just needs a little glue to work. I admit regexes are not the cleanest solution, but they match correct expressions correctly.

Maybe in the future there could be some sort of scheduler plugin system.

@dnephin
Copy link
Contributor

dnephin commented Feb 14, 2013

There is now a general purpose time specification (tron.utils.trontimespec) which will support the groc interval spec. All we'd need is a parser for the config entry.

https://github.com/irskep/Tron/blob/new_interval_scheduler/tron/config/schedule_parse.py

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

3 participants