Metadata-Version: 2.3
Name: aiocrontab
Version: 0.1.2
Summary: Crontab implementation in asyncio 
License: MIT
Author: Bhavesh Praveen
Author-email: bhavespraveen.dev@gmail.com
Requires-Python: >=3.12.1,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: croniter (==6.0.0)
Requires-Dist: typing_extensions ; python_full_version >= "3.12.1" and python_full_version < "3.13.0"
Description-Content-Type: text/markdown

# AIOCRONTAB

Sample project to "flex" my asyncio skills.

### Installation
```sh
pip install aiocrontab
```

### Usage

```python
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**

- [x] support for diff timezones
- [x] support for async task
- [x] take logger as dependency
- [ ] Add more meaningful tests
- [x] 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

```python
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.
```python
import logging

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

