-
Notifications
You must be signed in to change notification settings - Fork 202
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
Interval scheduler #80
Conversation
Exclude simple_scheduler package from setup.py.
The APNS example works not on Windows. Deleting it provides the simple_scheduler example on windows.
Create functionality to use apschedulers interval method.
The curl example needs the requests library.
Create functionality to use apschedulers interval method.
The trigger_params are different between get, modify and add. This change will unify the trigger_params in web requests.
Update documentation to meet the new interval job.
To match older python versions.
…scheduler into interval_scheduler
Hi, thanks for contributing! However, this is a pretty large PR, and it might take a while to get it reviewed. I'll try and take a look sometime this week but I think if you split this into one PR to deal with Windows and MS-SQL support and a second one to deal with the interval job, it will probably be easier to get these changes merged. In particular, adding Windows/MS-SQL support is likely to require some changes to our TravisCI config, and it's probably best to keep those as isolated as possible. |
Hy,
NDScheduler is a great project that I've used in a MS Windows based production environment. For my requirements NDScheduler has some weeknesses for creating interval-triggered jobs.
Using the pull request ##59 as starting point I've implemented the option to create interval triggered jobs and run NDScheduler on Windows.
Changes I've made
Installation problems
I've added the
requests
package to thesetup.py
-dependencies because it was missed during a fresh installation file.Then I've excluded the Python files from the simple_scheduler example from the installation to the site-packages directory. In my opinion example files shouln't be installed to the runtime environment.
Running on MS Windows
The APNS example job is removed from the simple_scheduler to allow the installation on MS Windows operation system. A dependency that is used the the APNS job can't be installed on Windows.
A new Datastore is added to provide support for Microsoft SQL server (
DatastoreMsSQL
).Using interval triggered jobs
For using the interval trigged jobs from the APScheduler the REST API has to be changed.
I've added a parameter
trigger
that is a string description for the jobs (cron
orinterval
). Then I moved all parameters that are used for the APScheduler's job trigger (like month, day_of_week, day, hour, minute) to an own dicttrigger_params
. For compatibility reasons I've changed the version of the API toV2
.After changing the API I've updated the UI to use the new Interval-Jobs.
The Jobs View will show the difference between an interval or cron job.
![jobs](https://user-images.githubusercontent.com/4608946/74103901-2f39b780-4b50-11ea-94e2-4c3858f68c9f.PNG)
Also in the Audit log a change in the trigger parameters will be shown.
![audit](https://user-images.githubusercontent.com/4608946/74103902-2f39b780-4b50-11ea-8501-666bc15d9890.PNG)
I also add the possibility to change or create the trigger within the UI. Therfore the Add-job View and the Edit-Jobs view are adapted.
![job-add](https://user-images.githubusercontent.com/4608946/74103899-2e088a80-4b50-11ea-9292-da6ba1d9f338.PNG)
![job-edit](https://user-images.githubusercontent.com/4608946/74103900-2ea12100-4b50-11ea-8fd9-646c010fb26a.PNG)
At the end I updated the REST API documentation and the available tests.