I wanna export all information in Windows Task Scheduler using Python, so I wrote the code as follows:
Import subprocess
subprocess.call(r'schtasks.exe / query / FO CSV > D:\tasks.csv /V')
Then I got ERROR: Invalid argument/option - '>'
But when I input schtasks.exe / query / FO CSV > D:\tasks.csv /V
in cmd, it works.
Can anybody help me with this? Thank you!