Forums

Are there logs for scheduled tasks?

Hello, I am using the Scheduled Tasks function provided by default by PythonAnywhere.

These days I see a script is not running and I do not understand why. Are there logs for scheduled tasks I can examine in order to understand what is happening?

Thanks in advance.

the list looking icon on the same row as the particular scheduled task (next to the edit icon) will give you the logs for that task.

My goodness, I am sorry, many thanks conrad. At least I hope this answer get other people covered about this specific doubt.

Hi, cleared this doubt for me too. But I get a "404 Not Found" message when I click the list icon. Does this mean there are no logs?

Logs are rotated daily at around 7am UTC if they are larger than 100KiB in size. When that happens, something.log is renamed to something.log.1, but first the existing something.log.1 is compressed to something.log.2.gzand so on up to something.log.9.gz.

So if you get a 404 error, it may be that the last time your task ran was before the most recent rotation, so the log file was moved aside. We don't have a good UI for looking at the old logs right now (it's on our list) but you can access it pretty easily by clicking on the link for the logs, then adding a ".1" to the end of the URL in your browser's location bar.

I had the same question. Thank you for clarifying

I'm glad it helped!