11 lines
414 B
Python
11 lines
414 B
Python
from datetime import datetime
|
|
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
|
from modules.utils import configGet
|
|
from modules.sender import send_content
|
|
|
|
scheduler = AsyncIOScheduler()
|
|
|
|
if configGet("post", "mode"):
|
|
for entry in configGet("time", "posting"):
|
|
dt_obj = datetime.strptime(entry, "%H:%M")
|
|
scheduler.add_job(send_content, "cron", hour=dt_obj.hour, minute=dt_obj.minute) |