Skip to main content

A Schedule Jobs Library

Project description

$ mkdir  path  && cd path
$ virtualenv venv --no-site-packages
$ . venv/bin/activate
$ mkdir jobs
$ touch jobs/__init__.py

jobs/date_job.py

from schedule_jobs.core.base_job import BaseJob
import datetime

class DateJob(BaseJob):
    def run(self, *args, **kwargs):
        print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))

main.py

from schedule_jobs.app import App


def main():
    print("main")
    app = App()
    app.schedule()


if __name__ == "__main__":
    main()

dir

path
path/jobs/__init__.py
path/jobs/date_job.py
path/main.py

finally

$ python main.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for schedule-jobs, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size schedule_jobs-0.0.4-py3-none-any.whl (7.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size schedule_jobs-0.0.4.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page