Skip to main content

It is extention for plugin of Errbot to implement poller llike crontab.

Version in PyPI python versions License Requirements Status

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!')
  1. Extend your plugin by CrontabMixin

  2. Define crontab

  3. In activate, activate crontab too

  4. 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.

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)

Source distribution for errcron 0.4.4
File Size Uploaded
errcron-0.4.4.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for errcron 0.4.4
File Interpreter ABI Platform
errcron-0.4.4-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.4.4 This release

2 release files

0.4.3

1 release file

0.4.1

1 release file

0.3.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.1.0.dev3

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page