- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Setting the job status within a Perl script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-20-2017 06:11 AM
Hi,
Not sure if this has been asked, or is possible, but I am writing a Perl script to do a number of tasks on a Cisco switch.
However I want the job to fail if certain conditions are/are not met within the script.
So I am using an integer variable, "vlan_id". I want the job to fail if the vlan_id is not valid for any reason.
That was one example.
Is there any perl snippet that will be able to set the job status to fail.
Guess the 1st thing would be to find out the job number though.
This is running internally within NetMRI and not as an external API call.
Thanks
Russ
Solved! Go to Solution.
Re: Setting the job status within a Perl script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-20-2017 06:13 AM
Re: Setting the job status within a Perl script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-20-2017 07:10 AM
Hi John,
Works perfectly. Thanks for the quick reply
Set the exit 1 on each of my conditions.
Many thanks
Russ
Re: Setting the job status within a Perl script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-16-2018 06:56 AM
Hi, You answered this some time ago and this works and flags a Red symbol with an X.
Is there anyway of exiting with a warning. e.g. Yellow triangle. Again it is an internal job.
Thanks in advance
Russ