I'm not the first person to run python scripts that require plain text credentials for third party web services as scheduled tasks. Answers to these questions provide some ways to obscure or otherwise keep sensitive information out of sight. I like the ssh-agent solution because it avoids the need for a file somewhere containing this information but I don't think I can implement it in my environment.
I'm curious as to why the general approach is not to require the user to input the information as command line arguments like
python myPythonScript.py UserName Password
If these parameters are defined in the scheduled task, I think only the logged in user would be able to access the task definitions. This probably isnt any worse than obfuscation.
I have to use Windows; surely scheduled task definitions are not accessible by all users... (I checked using the answer to How to find the location of the Scheduled Tasks folder and you need admin rights to access that folder)
Before I go ahead and use this approach, is there a reason why this would be a bad idea?