How to use taskscheduleR on a AWS EC2 running Windows?

Not sure if this is the correct place to post this, but I can't find an answer anywhere. I have a free tier EC2 running Windows on AWS. I want to schedule a R script to run every day at a specific time. It's a very simple script that reads a google sheet and then sends an e-mail using gmailr. The script works when I run it myself in the VM, and it runs with taskscheduleR on my own machine, but I can't get it to work as a scheduled task in the EC2. Does anyone know how I can do this?

Thanks in advance!