File Monitor in Task Sequence exit code issue

Discuss Task Sequences and Scripting related issues.

File Monitor in Task Sequence exit code issue

Postby Tech Support » Wed May 25, 2016 9:25 am

I have created a File Monitor task in a chain
I have noticed that if no file is detected in the first step and therefore the chain terminates, the chain will exit with a code = 1. Since I have the option selected in the sequence settings “Set exit code as last completed step, if all steps are not completed” I would have expected the chain to terminate with exit code = 0 since this is the code that the File monitor task exits with and there is no error to report?

This means I cannot use email notification for errors >0 because this chain will have exit code = 1 every time is runs and there are no new files?
Tech Support
Site Admin
 
Posts: 1224
Joined: Thu May 25, 2006 11:12 am

Re: File Monitor in Chain exit code

Postby Tech Support » Wed May 25, 2016 9:25 am

Good point which no user has ever brought up before.

In the File Monitor Step settings within the Task Sequence:
Select the option - If Exit code = 0 , skip to step 100 ..
This should complete the Sequence and Sequence exit code should end up = 0.

If above does not work, you may have to put a dummy echo task at the end and skip to that step ..
Tech Support
Site Admin
 
Posts: 1224
Joined: Thu May 25, 2006 11:12 am

Re: File Monitor in Chain exit code

Postby Tech Support » Wed May 25, 2016 9:26 am

Thanks for the reply. Setting the File Monitor as you have described still makes the sequence end with 1
I have used a Dummy echo task instead and this works fine.
Tech Support
Site Admin
 
Posts: 1224
Joined: Thu May 25, 2006 11:12 am


Return to Task Sequences, Chains and Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron