Closed WindexChugger closed 3 years ago
Have you tried scheduling without the days argument?
Thanks for the reply.
I haven't tried scheduling a "DAILY" task without the days argument but I have tested as a "ONCE" task without the days argument (which ran successfully). I'm confident it's something about the 'DAILY'/'WEEKLY' + days arguments, but I've double check syntax and can't see what I'm doing wrong.
Edit: I guess a workaround would be to setup as a "DAILY" without days arguments, and have the script check days of the week internally.
Try first without the days argument.
That still didn't work.
I did some digging, and found in the task list my tasks and the Power Management setting was set to "Stop On Battery Mode, No Start On Batteries". I was trying to run these tests on an unplugged laptop!
Based on 30 minutes of searching, it appears as though power management settings cannot be modified when creating a scheduled task via the command line (must use the schtasks.exe GUI, apparently).
My original code (with "WEEKLY" and the 'days' arguments) works fine when the laptop is plugged in.
If you know of any way to modify that setting via a "schtasks_extra" argument, please let me know. Otherwise, we can considered this issue resolved.
Cheers!
Closing as you indicate your computer was not plugged in which is indicated in the readme
Hello,
I've been trying to setup a task to run Monday through Friday at a specific time, but have not been successful. I have tried using both the add-in as well as R code (see below). With the add-in UI, I am able to run the script "ONCE", but when I switch to "DAILY" with the "days = ..." argument, the script doesn't run. To confirm: I am deleting the "ONCE" task before attempting to create the "DAILY" task, and I am ensuring that the date format matches my region. I have also confirmed that "file.exists(rscript)" returns TRUE.
I do not get any errors when running this script and am told that the task was scheduled; it just doesn't run.
Thanks!