Schedular
Schedular is a Python 2 scheduling library to create two types of jobs:
- Jobs running at certain interval at certain days from start time till end time
- Jobs that are triggered at a specific time of a specific day
Features
- Jobs can be put into groups which ensures sequencial execution of these jobs withing each group.
- Jobs not in any group will be run parallel.
Examples
from schedular import Schedular, Job
def test_job(param):
print param,"start",
time.sleep(2)
print "finished"
schedular = MyScheduler(threaded=True, skip_unfinished_jobs=True)
job1 = Job(start_time="10:00:00", end_time="15:33:00", days=["thu", "wed", "tue"], interval="10s", job=test_job, jobArgs="1", group="cam2")
job2 = Job(start_time="10:00:00", end_time="15:34:00", days=["thu", "wed", "tue"], interval="10s", job=test_job, jobArgs="2", group="cam2")
job3 = Job(start_time="10:00:00", end_time="15:35:00", days=["thu", "wed", "tue"], interval="10s", job=test_job, jobArgs="3", group="cam2")
job4 = Job(cut_off_time="16:00:00", days=["thu", "wed", "tue"], job=test_job, jobArgs="job4:once", group="cam1")
schedular.schedule(job1)
schedular.schedule(job2)
schedular.schedule(job3)
schedular.schedule(job4)
schedular.info(by_group=True)
schedular.start()
time.sleep(3000000)
schedular.stop()
gives output:
[ JOBS at Wed 24-10-2018 15:59:51]
- GROUP cam1
ID:3 DAYS:thu, wed, tue ST:NONE ET:NONE INT:NONE JOB:test_job(job4:once), NEXT: Thu 25-10-2018 16:00:00 (this week)[ACTIVE]
- GROUP cam2
ID:0 DAYS:thu, wed, tue ST:10:00:00 ET:18:33:00 INT:10s. JOB:test_job(1), NEXT: Wed 24-10-2018 16:00:00 (this week) [ACTIVE]
ID:1 DAYS:thu, wed, tue ST:10:00:00 ET:18:34:00 INT:10s. JOB:test_job(2), NEXT: Wed 24-10-2018 16:00:00 (this week) [ACTIVE]
ID:2 DAYS:thu, wed, tue ST:10:00:00 ET:18:35:00 INT:10s. JOB:test_job(3), NEXT: Wed 24-10-2018 16:00:00 (this week) [ACTIVE]
1 start finished
2 start finished
3 start finished
Although released as 1.0, there might be bugs. Don't use this is production software. Github project at https://github.com/noxqs/schedular
Licensed under the MIT License, enjoy
Metadata
Release files for schedular 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| schedular-1.0.4.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| schedular-1.0.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 1.7 MB
Release files / schedular-1.0.4.tar.gz
| Download URL | schedular-1.0.4.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6df8e1f38923225aed8ca1670a061d649ef8c824f12269ec2a6e0ae3217a3efa
|
|
BLAKE2b-256 checksum How to use checksums |
cd5164df47fe00fb37f1125d551472ffa79215ee367789d44a9c439d1feccf02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14
|
Release files / schedular-1.0.4-py2-none-any.whl
| Download URL | schedular-1.0.4-py2-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
1203f0dc7c6968f87187d85623c24dbb54b79016619e3ae36f51e1bf895a6fd6
|
|
BLAKE2b-256 checksum How to use checksums |
2a02b0a28d6c5bc846df9e4bd4c29334d756d444f808464c946892143571e638
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14
|
Security for schedular 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.