Task Scheduler task shows as completed successfully, but nothing happened - Scheduling a R Script

Vaishnavi Gopalakrishnan 1 Reputation point
2021-06-16T13:30:13.943+00:00

I have a big R script to generate around 73 excel files. When I run the entire script manually it took around 1 hour to complete.
I am scheduling the same in Windows task scheduler, it says task completed. But nothing happened.
Kindly help me. I have a hard deadline next week.

Thanks in advance!

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,461 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 33,371 Reputation points
    2021-06-16T16:26:55.413+00:00

    If you are writing code to execute unattended (with no user interaction), then you should also include proper error handling and logging in it. That way you have a log to examine to see what the script did. The time it started, the time it ended, any errors that it encountered, key data points like the number of records it processed, etc, etc.

    Forum users have no idea what your script is doing or what errors it might encounter.

    If "R" is a console based application (not a GUI), then also capture stdout and stderr.

    https://kb.froglogic.com/squish/howto/capturing-process-output-stdout-stderr-via-input-output-redirection/


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.