I am running a scheduled task to generate new Markdown files for my web application, which is based on Flask and Flask-Flatpages. For this reason, the final line of my generation script restarts the web application with the following command:
os.utime('/var/www/walkerandreas_pythonanywhere_com_wsgi.py')
This works when I run the script manually; however, when I run it as a scheduled task, it gives me the following error:
Traceback (most recent call last):
File "/home/walkerandreas/mysite/content.py", line 184, in <module> os.utime('/var/www/walkerandreas_pythonanywhere_com_wsgi.py')
TypeError: utime() takes exactly 2 arguments (1 given)
Any idea why that might be the case and how to fix it?