It is extention for plugin of Errbot to implement poller llike crontab.
Requirements
Installation
$ pip install errcron
or
$ pip install git+https://github.com/attakei/errcron.git
Usage
Example
from errcron import CrontabMixin
class ClockTimer(CrontabMixin, BotPlugin):
CRONTAB = [
'@hourly .post_hourly',
'0 8 * * * .post_morning_call @attakei'
]
def activate(self):
super().activate()
# some expression
def post_hourly(self, polled_time):
user = self.build_identifier('#general')
return self.send(user, 'Just {} o-clock!!'.format(polled_time.strftime('%H')))
def post_morning_call(self, polled_time, identity):
user = self.build_identifier(identity)
return self.send(user, 'Good morning!')
Extend your plugin by CrontabMixin
Define crontab
In activate, activate crontab too
Run
Latest changes
version 0.4.4
Fix for latest crontab-parser
Fix test targets in Travis-CI
version 0.4.3
Add python 3.6 for test target (compatible)
Can import as from errcron import CrontabMixin
License
Errbot is available as open source software and released under the GPL v3 license.
See full license file.
Metadata
Release files for errcron 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| errcron-0.4.4.tar.gz | 5.6 kB | Without provenance | Details for errcron-0.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| errcron-0.4.4-py3-none-any.whl | Python 3 | none | any | Details for errcron-0.4.4-py3-none-any.whl |
Total release size: 12.9 kB
Release files / errcron-0.4.4.tar.gz
| Download URL | errcron-0.4.4.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20437246cf9d28a9437075241ebbcab4ed278e98cdbe6983b5d4af38c026603e
|
|
BLAKE2b-256 checksum How to use checksums |
c51301ec83e289dc5627e26df0d23ac29978f69b3fe7e76d912ca005b5fb54f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / errcron-0.4.4-py3-none-any.whl
| Download URL | errcron-0.4.4-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
185429abf6a999de5a2873c7f5c44f98d30102885b4ca61de2d4fe12cab03add
|
|
BLAKE2b-256 checksum How to use checksums |
78ca44bd5409373a4ab0f28bb964a50d873aefa465f1aa138710502a45192c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for errcron 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.