bnosac / taskscheduleR

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

terminal window pop up when running #104

Closed Quan-Cui closed 8 months ago

Quan-Cui commented 8 months ago

I'm encountering an issue while using taskscheduleR in RStudio. When I set up automatic script execution using the taskscheduler_create function, a Windows console window keeps popping up during script execution. This behavior is both unexpected and inconvenient, especially since closing the window prematurely halts the script.

Is there a way to prevent this console window from appearing? I would appreciate any guidance or suggestions to resolve this issue.

jwijffels commented 8 months ago

See https://superuser.com/questions/195249/how-to-execute-a-scheduled-task-with-schtasks-without-opening-a-new-command-li You should specify the the user account (user context) under which the task runs.

You can add these in argument schtasks_extra in taskscheduler_create. See also https://github.com/bnosac/taskscheduleR/issues/83