get_csv_schedule.Rd
get_csv_schedule()
is used to make download task.
get_csv_schedule(
taskname,
schedule,
starttime,
startdate,
rscript_args = NULL,
...
)
A character string with the name of the task. Defaults to the filename. Should not contain any spaces.
Either one of 'ONCE', 'MONTHLY', 'WEEKLY', 'DAILY', 'HOURLY', 'MINUTE', 'ONLOGON', 'ONIDLE.
A time point in HH:mm format indicating when to run the script. Defaults to within 62 seconds
A date that specifies the first date on which to run the task. Only applicable if schedule is of type 'MONTHLY', 'WEEKLY', 'DAILY', 'HOURLY', 'MINUTE'. Defaults to today in '%d/%m/%Y' format. Change to your locale format if needed.
Character string with further arguments passed on to Rscript.
other parameters.
CSV files in the path of save_path.
# Make a download task
get_csv_schedule(taskname = "ppt_csv_download",
schedule = "DAILY",
starttime = "20:00",
startdate = format(Sys.Date(), "%Y/%m/%d"),
rscript_args = list(url = Sys.getenv("url"),
username = Sys.getenv("username"),
password = Sys.getenv("password"),
location = c("606","607"),
download_path = "C:/Users/Dell/Downloads/download_rename"))
#> [1] "SUCCESS: The scheduled task \"ppt_csv_download\" has successfully been created."
# Delete download task
taskscheduleR::taskscheduler_delete("ppt_csv_download")
#> [1] 0
# Reset selenium webdriver service
disconnect_from_browser()
#> ● No Selenium server process found.
#> ● No Chromedriver process found.
#> ● No startup .bat file found.