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.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View
Filename, size schedule_jobs-0.0.4-py3-none-any.whl (7.3 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page