My scheduled task main.py
on pythonaniwhere runs once daily starting at the time I set and then lasts forever (i.e., until the next day’s restart) because it contains a while True
loop with a time.sleep
of 60 seconds. While there are no evident issues with its execution, the problem is that if I try to access the logs (in var/log
) they are empty: cat <lognumber>.log
does not show anything, and if I click on the logs icon in my scheduled tasks’ page, it shows a blank page.
I would like to be instructed on how to solve the abovementioned problem.
Thanks
I tried commenting out print statements in main.py
to ensure they were not interfering with the log output.
I also made sure that the task was scheduled correctly, in my case by the command python3.10 <whole_path>/main.py
The problem has not been solved.