| name | cron |
| description | Schedule reminders and recurring tasks. Actions: add, list, remove or set_context. |
add a job to the cron
from loguru import logger
from skills.builtin.core.cron.scripts import cron
if __name__ == '__main__':
name: str| None = "{placeholder}"
message: str | None = "{placeholder}"
every_seconds: int | None = int("{placeholder}")
cron_expr: str | None = "{placeholder}"
tz: str | None = "{placeholder}"
at: str | None = "{placeholder}"
deliver: bool | None = bool("{placeholder}")
res = cron.add_job(name, message, every_seconds, cron_expr, tz, at, deliver)
logger.info(res)
list jobs
from loguru import logger
from skills.builtin.core.cron.scripts import cron
if __name__ == '__main__':
res = cron.list_jobs()
logger.info(res)
remove jobs
from loguru import logger
from skills.builtin.core.cron.scripts import cron
if __name__ == '__main__':
job_id: str | None = "{placeholder}"
res = cron.remove_job(job_id)
print(res)
set_context
from skills.builtin.core.cron.scripts import cron
if __name__ == '__main__':
channel: str = "{placeholder}"
chat_id: str = "{placeholder}"
res = cron.set_context(channel=channel, chat_id=chat_id)
print(res)