Closed matrixx567 closed 2 years ago
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-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.