from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
schedule_id = client.schedule.create(
destination="https://my-api...",
cron="*/5 * * * *",
)
print(schedule_id)
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
client.schedule.create(
destination="https://my-api...",
cron="0 * * * *",
callback="https://my-callback...",
failure_callback="https://my-failure-callback...",
)
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
client.schedule.create(
destination="my-url-group",
cron="0 * * * *",
)
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
schedule = client.schedule.get("<schedule-id>")
print(schedule.cron)
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
all_schedules = client.schedule.list()
print(all_schedules)
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
client.schedule.delete("<schedule-id>")
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
schedule_id = client.schedule.create(
destination="https://my-api...",
cron="*/5 * * * *",
timeout="30s",
)
print(schedule_id)
from qstash import QStash
client = QStash("<QSTASH-TOKEN>")
schedule_id = "scd_1234"
client.schedule.pause(schedule_id)
schedule = client.schedule.get(schedule_id)
print(schedule.paused)
client.schedule.resume(schedule_id)