why does my always-on task keep stopping?
I have two tasks, but yesterday, one stopped, and today another one stopped.
the log just stopped at a certain point, and it the task just didn't work.
why does my always-on task keep stopping?
I have two tasks, but yesterday, one stopped, and today another one stopped.
the log just stopped at a certain point, and it the task just didn't work.
solution please
What do you see in your task's logs? Is your code made to run in endless loop or is it exiting and restarting?
It is a stock order code. It contains
while True:
print("Current time:", datetime.now())
schedule.run_pending()
time.sleep(1)
but, the log suddenly stopped at a certain point (ex. 2025-07-28 19:04:01), and did not continue. Also for today, the log does not appear and the log page is just white.
[formatted by admin]
Our logs rotate, so it's possible that the output you saw is now under log with .1 extension (you can fing it in /var/log or by appending .1 to the current log's url. Also, the output is by the default buffered, so it may show up after delay if you use bare print, I you want a faster feedback, add fluch=True to the print call.