Catalog PyPI
PACKAGE EXPLORERView in registry

aiocrontab

PyPI

Crontab implementation in asyncio

Versions collected1
Direct dependencies2From release 0.1.2
Last observed21 Oct, 11:45 UTC

README

Version 0.1.2 documentation

AIOCRONTAB

Sample project to "flex" my asyncio skills.

Installation

pip install aiocrontab

Usage

import time

import aiocrontab


@aiocrontab.register("*/5 * * * *")
def print_every_five_mminutes():
    print(f"{time.ctime()}: Hello World!!!!!")

@aiocrontab.register("* * * * *")
def print_every_mminute():
    print(f"{time.ctime()}: Hello World!")


aiocrontab.run()

TODO

  • support for diff timezones
  • support for async task
  • take logger as dependency
  • Add more meaningful tests
  • fix mypy errors
  • document the codebase
  • document usage in readme
  • different namespaces for different crontab instances
  • ability to schedule task from code
  • better logging messages

If you didn't create any new Crontab instance (ie: You are using @aiocrontab.register), you can get the logger that the aiocrontab application uses using the following snippet

import logging

logger = logging.getLogger("global.aiocrontab.core")

If you created your own Crontab instance(using Crontab()), and in-case you didn't provide the logger when creating a Crontab instance, you can use the following snippet to get the logger that it uses.

import logging

logger = logging.getLogger("aiocrontab.core")

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.223 Jul 20252

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:45 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:193dbb6e78d98d63229d520ba4121f8b5bfe9ff6b5749765f70316508f4ac849