I am using a VM instance in Google Cloud Console to automatically run some python scripts but it doesn't seem to be working. I have a test script called "emailtest.py", the file path of which is C:\Users\username\emailtest.py. emailtest.py essentially just sends me an email and when I RDP into the instance it works fine. I also have a Powershell script called startupscript.ps1, the only commando of which is "python emailtest.py" and the file path is C:\Users\username\startupscript.ps1. I have tried to automatically run the script a few different ways:
Key: windows-startup-script-cmd, Value: python emailtest.py
Key: windows-startup-script-ps1, Value: C:\Users\username\startupscript.ps1
Key: windows-startup-script-url Value: gs://csvconversion/startup.ps1
I have been testing this by attaching this instance to an instance scheduler and letting it run for about 15 minutes at a time but I never receive an email. Is there anything that I might be missing here? Am I perhaps going about testing this incorrectly? Any help is greatly appreciated!