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")
Release files for aiocrontab 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiocrontab-0.1.2.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiocrontab-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / aiocrontab-0.1.2.tar.gz
| Download URL | aiocrontab-0.1.2.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7349908cb28d43b20a38287733a12fb36cb168190cde2891c63a2661baa188a1
|
|
BLAKE2b-256 checksum How to use checksums |
c04317bac2d7ad8c913c4107e7e5276a0203cbb532bb51699dc51725dad82adf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Darwin/22.1.0
|
Release files / aiocrontab-0.1.2-py3-none-any.whl
| Download URL | aiocrontab-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb70514057d745b3947e73b09d12dc06052bc715ffc5cb5745c5964195ddb556
|
|
BLAKE2b-256 checksum How to use checksums |
3687a26feb98368353d1d1e4f729caedd401605bf16c826b66c025bf36145a4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Darwin/22.1.0
|