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.

Filename, size & hash SHA256 hash help File type Python version Upload date
schedule_jobs-0.0.4-py3-none-any.whl (7.3 kB) Copy SHA256 hash SHA256 Wheel py3
schedule_jobs-0.0.4.tar.gz (4.4 kB) Copy SHA256 hash SHA256 Source None

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