Periodic task with timezone
Project description
Periodic task with timezone
from periodtask import Task, Period, parse_cron, send_mail
task = Task(
name='test',
command=('/periodtask/test_script.py',),
periods=[
Period(
timezone='Europe/Budapest',
minutes=list(range(0, 60)),
seconds=list(range(0, 60, 5)),
),
# cron fmt: minutes, hours, days, months, weekdays,
# timezone, years, seconds
# in contrast to Cron:
# - `weekdays` is not treated specially
# - no special handling of daylight saving time changes
parse_cron('* * * * * Europe/Budapest * */5')
],
run_on_start=True,
mail_failure=True,
mail_success=True,
mail_skipped=True,
wait_timeout=5,
stop_signal=signal.SIGINT,
send_mail_func=send_mail,
from_email='richardbann@gmail.com',
recipient_list=['richard.bann@vertis.com']
)
task.start()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
periodtask-0.2.0.tar.gz
(5.8 kB
view details)
File details
Details for the file periodtask-0.2.0.tar.gz
.
File metadata
- Download URL: periodtask-0.2.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44d9c0044abf55eae3a93e262927e531a352571a75269356ba223c904a0c8a0c |
|
MD5 | 9c7f9769ee1cb2694e81c2a6a0c98a33 |
|
BLAKE2b-256 | 55b4bced61cf2f1f7b2555dd131fc62c93a4ec19391117025293d4a792b1d473 |