bnosac / taskscheduleR

Schedule R scripts/processes with the Windows task scheduler.
331 stars 72 forks source link

Support for task at startup #66

Open lorenzwalthert opened 5 years ago

lorenzwalthert commented 5 years ago

Hi

Thanks for this useful package. I have the following problem: Sometimes, it seems as Windows restarts unexpectedly to install software updates. This might be ok, but the problem is that it leaves running taskscheduleR scrips in a broken state. I'd like to schedule a script at startup to basically restore the state. Hence, I'd need support for "at startup", in addition to the existing methods like "on idle" and "on logon". Also, do you know what happens if I restart and don't log a user in? Does this already trigger "on logon" or does "on logon" mean if I enter my credentials and literally log in. Thanks.

Here is a link with the syntax: https://support.microsoft.com/de-de/help/814596/how-to-use-schtasks-exe-to-schedule-tasks-in-windows-server-2003

jwijffels commented 5 years ago

Yes that would be interesting, feel free to contribute with a pull request

lorenzwalthert commented 5 years ago

I realized it is more complicated because of permissions needed to execute this (and other problems I can't remember), so we solved the problem otherwise and I won't do a PR.