Don't run it as a scheduled task you need to run it as a service.
Don't run it using an Administrator user account. Create a user and give specific permissions to access the folders required.
Any program can be wrapped as a service. I use NSSM:
https://nssm.cc/ but other service managers are available.