Closed ghost closed 6 years ago
I don’t understand what you mean with plugged in? A task can only be executed if your computer is switched on and is not in sleep mode. Is that your question?
There is an option that prevent the task to start if the computer is not plugged in on AC power, I think 3mzel is refering to that.
I haven't seen this option the documentation of schtasks.exe /Create /? if you run it in a shell. What option is this in schtasks.exe?
I think that option is not part of schtasks.exe what you need to do is explained at https://stackoverflow.com/questions/9075564/change-settings-for-power-for-windows-scheduled-task#9075595 Create an XML file with this content
<Settings>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
</Settings>
and pass it on to schtasks_extra
when calling taskscheduler_create
as "/XML yourfilename.xml"
Closing this as I don't think this is possible easily using the schtasks.exe
program which this R package is using to schedule jobs.
The default setting is that the task will only run when my laptop is plugged in. Is there a way to change this setting to allow tasks to run even when not plugged in?