We have few hundred jobs hanging in the system for a while now.I want to remove all these jobs from the system. In the IWsystem module, there is a function to find out jobs and active jobs which are GetWorkflows() and GetActiveWorkflows(). How to find out inactive jobs ? Is there a function for that ? Or do I need to use perl function to list out uncommon elements from the arrays of all jobs and active jobs ?I want to remove workflows, which are older than a week. How to catch the number of days for a workflow ?How do I run iwrmjob.exe in the script to remove all inactive jobs ? I need an idea about how to run a command line tool in the script.Thanks
my $rm_string = "/iw-home/bin/iwrmjob $JOB_ID";
[html]my $system = new TeamSite::WFsystem(); my $wfs = $system->GetWorkflows();foreach my $workflow (@{$wfs}) {my $JOB_ID = $workflow->GetId(); print "Removing Job # $JOB_ID\n"; my $rm_string = "/iw-home/bin/iwrmjob $JOB_ID"; my $result = `$rm_string`; }[/html]I have found above script from previous threads. We need to run iwrmjob clt on the command line to remove job from system. Here is the line in above code that removes the job My confusion is regarding the running this code on command line. Does this code run on command line ? If not, then how will it remove job from system. Can somkeone please explain, how does this code work at command line ?Thanks