Page 1 of 1

Copy/move causes task to abort

Posted: Tue Jun 28, 2011 5:57 pm
by stevefromdodge
As part of my server monitoring system, I'm setting up tasks to write a file to each of my file shares. I'm using "Copy/Move File" to copy a tiny text file to the share. My idea was to use {IsError} to determine the success or failure and then send an email in the event of a failure.The problem is that if "Copy/Move File" tries to write to a non-existent folder, it's aborting the task, rather than returning an error code and continuing the task.Ideas? 

Copy/move causes task to abort

Posted: Thu Jun 30, 2011 3:11 pm
by stevefromdodge
Still working on this one. I've tried "Copy/Move File", "Write text file" and "Change folder".  All are having the same problem.



Copy/move causes task to abort

Posted: Thu Jun 30, 2011 4:35 pm
by Oleg
The problem is that if "Copy/Move File" tries to write to a non-existent folder, it's aborting the task
I've just tested this.
If the target folder doesn't exist the action creates requested folder (of course if the folder have valid name)
Probably you have no enough rights to create folder or the folder name is invalid.

Copy/move causes task to abort

Posted: Mon Jul 11, 2011 6:27 pm
by stevefromdodge
Oleg wrote:I've just tested this.
If the target folder doesn't exist the action creates requested folder (of course if the folder have valid name)
Probably you have no enough rights to create folder or the folder name is invalid.
I probably could have phrased it better. If I try to copy a file to \\server\share\folder and the server is offline, the task aborts.

Copy/move causes task to abort

Posted: Tue Jul 12, 2011 4:56 am
by Oleg
I probably could have phrased it better. If I try to copy a file to \\server\share\folder and the server is offline, the task aborts.
If server is offline you can't copy files to network folder in any case.

Try to check the server existence. I use the action "Ping host" to check whether server is active.

see the example below:

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|101188231
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task243"
Hide=INTEGER|0
ID=INTEGER|2048670453
LocalVariables=STRING|"ping"
LogOnAsUser=INTEGER|1
Name=STRING|"Copy/Move File to nonexisting folder"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER

[Actions\Action1]
ActionID=STRING|"A_INET_PING"
Enabled=INTEGER|-1
Name=STRING|"Ping xp-pro"
Params=FOLDER

[Actions\Action1\Params]
default=STRING|"-1"
host=STRING|"xp-pro"
timeout=STRING|"5000"
variable=STRING|"PING"

[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"1"
value1=STRING|"{ping}"
value2=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_FILE_COPY"
Enabled=INTEGER|-1
Name=STRING|"Copy/Move File"
Params=FOLDER

[Actions\Action3\Params]
destdir=STRING|"\\XP-PRO\share\nofolder"
f_count=STRING|"1"
file0=STRING|"C:\incoming\commatext.txt"
hidden=STRING|"1"
ifexists=STRING|"0"
move=STRING|"0"
subdir=STRING|"0"
system=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action5]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Prabably server is down!!"""
Params=FOLDER

[Actions\Action5\Params]
icon=STRING|"0"
msg0=STRING|"Prabably server is down!!"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action6]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"


Copy/move causes task to abort

Posted: Tue Jul 12, 2011 9:30 pm
by stevefromdodge
The greater scope of my project is to test all of the various components of our network and send notifications if anything fails. I ping each server first, but that's really just checking if the server is alive. If the server responds to ping, then I test each of the user resources on the server. I'm checking email, ftp, web services, file shares, whatever each server might provide.In this specific task, I'm looking to test if a network folder can be written to. This might fail if the server was offline, if it was full, if the security context couldn't be resolved, if DNS failed, maybe other reasons. What I'm hoping to do is write a file to the share and return an error code if the operation fails. I can then key off that error code to send notifications that the server has issues.

Copy/move causes task to abort

Posted: Wed Jul 13, 2011 4:08 am
by Oleg
I'm checking email, ftp, web services, file shares
You have to test it directly: send/receive email, upload/download some FTP file, download main page of the site(for example), copy file to/from network folder and etc.

If task raises an error you can run "error handler" task.
You can send email to you (or other notification) with description of error (task, step, error message, etc).
Open the task editor -> Advanced tab
see "If error occurred" parameter.
Also read here

Copy/move causes task to abort

Posted: Mon Jul 18, 2011 6:36 pm
by stevefromdodge
Thanks Oleg; the "If error occurred" parameter was the key. I was able to get the task working after I changed it to "Continue Execution".