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.

Source Distribution

schedule_jobs-0.0.4.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

schedule_jobs-0.0.4-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page