B
B
b822022-03-16 16:01:54
Python
b82, 2022-03-16 16:01:54

Is it possible to run scripts on heroku on a schedule?

Hello. Is it possible to run scripts on heroku on a schedule? I need the script to run from 00:00 to 01:00 and restart in case of any errors.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nesterov, 2022-03-16
@AlexNest

Is it possible to run scripts on heroku on a schedule?

Option 1: tyk
Option 2: Make an infinite loop and check the time with "regular methods"
Without real code, it's hard to think of other options.
restarted in case of any errors.

Code falling from errors is shitty code. Cover it with at least exceptions:
try:
    todo() # Сделать а
except [ErrorName]: # ErrorName - название ошибки
    todo_else() # сделать б, если в а выпала ошибка

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question