Checking if an FTP server is up
-
- Posts: 30
- Joined: Tue Apr 05, 2011 3:39 pm
Checking if an FTP server is up
I'm using RoboTask to set up a whole series of monitoring tasks on our network. One of these is checking to see that 5 different FTP servers are running properly and accepting uploads. I used a task shared here as an idea source for mine.My version of the script:Sets a variable to falseLogs on to the FTP serverUploads a fileUses FTP Loop to determine if the file is there If the file is there, it says the variable to trueIf the variable is false it sends an emailDeletes the fileLogs off the FTP serverIt seems to work fine if the script can log on to the server. If the script fails earlier (DNS, FTP server down etc), the script aborts and no email is sent. I'm guessing that I need some way to monitor the exit status of the earlier commands.How can I get my script to send an email for ANY kind of failure that prevents me from uploading a file?
Checking if an FTP server is up
You can use the error handler.
Read chapters of the help, please:
http://www.robotask.com/help/errorsprocessing.htm
http://www.robotask.com/help/tasknew.htm#3
and related chapters.
When some error has been raised in the task, RoboTask launch the error handling task and pass all necessary parameters of the error.
Read chapters of the help, please:
http://www.robotask.com/help/errorsprocessing.htm
http://www.robotask.com/help/tasknew.htm#3
and related chapters.
When some error has been raised in the task, RoboTask launch the error handling task and pass all necessary parameters of the error.
Checking if an FTP server is up
Also see the example:
"[DEMO] Error Handling Demo (Send Email with error)"
You always can download demo tasks here
"[DEMO] Error Handling Demo (Send Email with error)"
You always can download demo tasks here
-
- Posts: 30
- Joined: Tue Apr 05, 2011 3:39 pm
Checking if an FTP server is up
Thanks Oleg. Works like a charm!