Forums

Scheduled tasks don't run in the working directory specified on the 'web' page

It seems that scheduled tasks run in 'home/username' regardless of the setting for working directory on the 'web' tab which in my case is 'home/username/py4web'?

It's not causing a big problem but it does mean that logging goes into a different place than logging from the web app itself? And it seems inconsistent - is there a reason why the 'working directory' setting doesn't apply to scheduled tasks?

All the logging that we provide in web apps and tasks goes to /var/log/ For your own interaction with files we always recommend absolute paths. See https://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/#use-absolute-not-relative-paths