Hi All,
I have a scheduled data stage job run via below script on daily basis.
#! /usr/bin/sh
dshome=`cat /.dshome`;
export dshome
PATH=$PATH:$dshome/bin;
export PATH
. $dshome/dsenv
dsjob -run -param source_file=$1 Test_Project Seq_job.$2
Some times the job gets aborted due to avoidable issues like file didnt land because of market holiday yesterday.
So is it possible to add any command in the same script to reset the sequence job and all the jobs called from the sequence job if it has aborte last time?
Thanks in advance.
Sjordery.
Resetiing a job via shell script
Moderators: chulett, rschirm, roy
dsjob -run -mode RESET
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Thanks ArndW.
I tried that but its prompting with error
'Status code = -2 DSJE_BADSTATE
Error running job"
Does the command resets all the jobs called from the sequence jobs along with the main sequence job?
below is the script I am using.
-------------------------------------------------------------------------------------
#! /usr/bin/sh
dshome=`cat /.dshome`;
export dshome
PATH=$PATH:$dshome/bin;
export PATH
. $dshome/dsenv
dsjob -run -mode RESET -param source_file=$1 Test_Project Seq_job.$2
-------------------------------------------------------------------------------------
Thanks,
SJordery.
I tried that but its prompting with error
'Status code = -2 DSJE_BADSTATE
Error running job"
Does the command resets all the jobs called from the sequence jobs along with the main sequence job?
below is the script I am using.
-------------------------------------------------------------------------------------
#! /usr/bin/sh
dshome=`cat /.dshome`;
export dshome
PATH=$PATH:$dshome/bin;
export PATH
. $dshome/dsenv
dsjob -run -mode RESET -param source_file=$1 Test_Project Seq_job.$2
-------------------------------------------------------------------------------------
Thanks,
SJordery.
You need 2 separate calls, the first to RESET, then the 2nd to run.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
And no, it only resets the job mentioned on the command line, no others automagically. Your Sequence job should be setup to do the resetting of any 'child' jobs it runs using the 'Reset if required then run' option in the Job Activity stage.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers