I have some R scripts that I would like to run automatically on Windows. Using the package taskscheduleR
I can, directly from R, set up all these tasks on Windows Task Scheduler.
They create with the following action within the task properties:
/c path/to/Rscript.exe "path/to&/my_script.R" >> "path/to/static/my_log.log" 2>&1
While I understand the syntaxis I would like to know if there is a way to pass the current date to the "path/to/static/my_log.log"
in the format AAAA-MM-DD
.
Is there anything similar in Windows to a environment variable but that used for dates?
Some string like "path/to/dinamic/%%SYS.DATE%%/my_log.log"
that I can send in the task creation to dinamically create dirs every date the tasks are run?
Thanks