View previous topic :: View next topic |
Author |
Message |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Tue Oct 01, 2013 7:44 pm Post subject: Task Sequence based on Variable Value |
|
|
User Support Request:
I am trying to create a file move file task and if the task completes with error code = 0 then send a success email but if the job fails to I need it to send a failure email.
I created all the steps and run the task and it will move the file and email the success email no problem.
I remove the file from the source directory and the task still completes with error code = 0 when there is no file in the source directory to move.
Why does this not error when there is no file to move?
I need to know that the file exist and that It move the new copy everyday. |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Tue Oct 01, 2013 7:46 pm Post subject: |
|
|
Having 0 files is not an error condition.
You could check the variable value and send the emails based on the variable value.
Create 2 variable monitor tasks:
monitorCopied:
variable name = MoveToDrive::FilesCopied
variable value > 0
Task to run = MoveSuccessEmail
monitorNoFileExists:
variable name = MoveToGDrive::FilesCopied
variable value = 0
Task to run = MoveFailedEmail
Then in your task sequence:
step 1 = MoveToDrive
step 2 = monitorCopied
step 3 = monitorNoFileExists |
|
Back to top |
|
 |
|