1.

Solve : Script file?

Answer»

I have a script that runs as per the schedule task on a hourly basis. the sript doesnt run and there is no way to get an alert at the event of failure to run the script. I want to recieve an alert whenever the script file fails to execute. I have an idea to get a log file whenever the script file executes. I will create another batch file that checks for the log file and I believe there can be a way to do this. If the log file is created with the date variable and the new batch file that i plan to create to check the execution of batch file will also check for the date variable file so that i can know that the log file was created for that particular date or infact no need to do by date but once the CONDITION is met we can add a command to delete the log file.

so the new batch file should see for the log file and if meets the condition then it skips the net send command and goes to command to delete the log file and if the condition fails it goes to net send or any otehr way to send an alert and sends an alert.

I have explained the whole thing in a not so techincal way. but some one with the knowledge of scripting can understand the problem adn help me.There might be a couple of things you can do:

Open Scheduled Tasks
On the Advanced menu, select Notify Me of Missed Tasks

Personally, I only seem to get a popup about missed tasks after a boot. This might not be timely enough for you.

Quote

I have an idea to get a log file whenever the script file executes. I will create another batch file that checks for the log file and I believe there can be a way to do this. If the log file is created with the date variable and the new batch file that i plan to create to check the execution of batch file will also check for the date variable file so that i can know that the log file was created for that particular date or infact no need to do by date but once the condition is met we can add a command to delete the log file.

You may be in luck. The SCHEDULER keeps a log (SchedLgU.Txt) in your Windows directory that contains task NAMES, start and end TIMES, and the result. A simple script should be able to process this file and determine the success/failure of your scheduled task.

Good luck. There is no OPTION in advanced to notify in case of task failed. However the log file that u suggest will try to explore that but now i need to get a quick one


Discussion

No Comment Found