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

Interval scheduler #80

Closed
wants to merge 15 commits into from
Closed

Conversation

matrixx567
Copy link

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 the setup.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 or interval). 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 dict trigger_params. For compatibility reasons I've changed the version of the API to V2.

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

Also in the Audit log a change in the trigger parameters will be shown.
audit

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
job-edit

At the end I updated the REST API documentation and the available tests.

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.
@sabw8217
Copy link
Contributor

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.

This was referenced Feb 10, 2020
@matrixx567 matrixx567 closed this Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants