I have a written a script (in R)
cmd = paste0("schtasks /create /sc WEEKLY /d MON /tn ",task," /tr ",comm," /st 12:51") system(command = cmd)
task is the name of the task and
comm is the location of
R and the script. This works and the script is executed. However I have some scripts where I would like to pass my credentials.
Essentially this is just adding
/RU *** /RP *** to
cmd, however I don't think storing my username and password is a good idea in a shared file.
Is there a way to encrypt the credentials or maybe another alternative?