{AJS設計業}2.4.7 ルートジョブネットの実行順序を制御する(ジョブネットコネクタを使ったジョブネットの定義例)

  • 物理ホスト

job110
job120 → jc1(AJSROOT1:/jg2/jobnet1)
job130 → jc2(AJSROOT2:/jg1/jobnet1)
job140

vim /root/unitbackup.txt

unit=jg1,,jp1admin,;
{
ty=g;
cm="jg1";
el=jobnet1,n,+0+0;
op=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
op=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=jc1,nc,+560+144;
el=jc2,nc,+720+144;
el=job110,j,+400+144;
el=job140,j,+880+144;
ar=(f=jc1,t=jc2,seq);
ar=(f=jc2,t=job140,seq);
ar=(f=job110,t=jc1,seq);
sd=1,2019/11/03;
st=1,17:43;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
rg=99;
ex="mmm182";
unit=jc1,,jp1admin,;
{
ty=nc;
cm="jc1";
ncr=/jg2/jobnet1;
}
unit=jc2,,jp1admin,;
{
ty=nc;
cm="jc2";
ncr=/jg1/jobnet1;
ncex=y;
nchn="mmm181";
ncsv=AJSROOT2;
}
unit=job110,,jp1admin,;
{
ty=j;
sc="/root/job110.sh";
un="root";
tho=100;
wth=50;
ex="mmm182";
}
unit=job140,,jp1admin,;
{
ty=j;
cm="job140";
sc="/root/job140.sh";
un="root";
tho=100;
wth=50;
ex="mmm182";
}
}
}
unit=jg2,,jp1admin,;
{
ty=g;
cm="jg2";
el=jobnet1,n,+0+0;
op=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
op=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=job120,j,+240+144;
sd=1,2019/11/03;
st=1,17:42;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
rg=99;
ex="mmm182";
ncl=y;
ncn=/jg1/jobnet1/jc1;
ncs=y;
unit=job120,,jp1admin,;
{
ty=j;
cm="job120";
sc="/root/job120.sh";
un="root";
tho=100;
wth=50;
ex="mmm182";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajskill -F AJSROOT1 "/*/*"
/opt/jp1ajs2/bin/ajsleave -F AJSROOT1 "/*/*"
/opt/jp1ajs2/bin/ajsdefine -F AJSROOT1 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsprint -F AJSROOT1 -s yes "/*"
/opt/jp1ajs2/bin/ajsentry -F AJSROOT1 -f /jg1/jobnet1
/opt/jp1ajs2/bin/ajsentry -F AJSROOT1 -f /jg2/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJSROOT1 -s "/*/*"

vim /root/unitbackup.txt

unit=jg1,,jp1admin,;
{
ty=g;
cm="jg1";
el=jobnet1,n,+0+0;
op=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
op=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=job130,j,+560+240;
sd=1,2019/11/01;
st=1,17:41;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
rg=99;
ex="mmm182";
ncl=y;
ncn=/jg1/jobnet1/jc2;
ncs=y;
ncex=y;
nchn="mmm181";
ncsv=AJSROOT1;
unit=job130,,jp1admin,;
{
ty=j;
cm="job130";
sc="/root/job130.sh";
un="root";
tho=100;
wth=50;
ex="mmm182";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajskill -F AJSROOT2 "/*/*"
/opt/jp1ajs2/bin/ajsleave -F AJSROOT2 "/*/*"
/opt/jp1ajs2/bin/ajsdefine -F AJSROOT2 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsprint -F AJSROOT2 -s yes "/*"
/opt/jp1ajs2/bin/ajsentry -F AJSROOT2 -f /jg1/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJSROOT2 -s "/*/*"

/opt/jp1ajs2/bin/ajsshow -F AJSROOT1 -f" %J %i %G %B" -b 2019/11/23 -e 2019/11/25 "/*/*"
/opt/jp1ajs2/bin/ajsshow -F AJSROOT2 -f" %J %i %G %B" -b 2019/11/23 -e 2019/11/25 "/jg1/*"

tail -f /root/job.log

 

  • 論理ホスト

job110
job120 → jc1(AJS3SCHEDULE001:/jg2/jobnet1)
job130 → jc2(AJSROOT2:/jg1/jobnet1)
job140


vim /root/unitbackup.txt

unit=jg1,,jp1admin,;
{
ty=g;
cm="jg1";
el=jobnet1,n,+0+0;
op=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
op=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=jc1,nc,+560+144;
el=jc2,nc,+720+144;
el=job110,j,+400+144;
el=job140,j,+880+144;
ar=(f=jc1,t=jc2,seq);
ar=(f=jc2,t=job140,seq);
ar=(f=job110,t=jc1,seq);
sd=1,2019/11/03;
st=1,17:56;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
rg=99;
ex="mmm194";
unit=jc1,,jp1admin,;
{
ty=nc;
cm="jc1";
ncr=/jg2/jobnet1;
}
unit=jc2,,jp1admin,;
{
ty=nc;
cm="jc2";
ncr=/jg1/jobnet1;
ncex=y;
nchn="mmm190";
ncsv=AJSROOT2;
}
unit=job110,,jp1admin,;
{
ty=j;
sc="/mnt/sdc2/job110.sh";
un="root";
tho=100;
wth=50;
ex="mmm194";
}
unit=job140,,jp1admin,;
{
ty=j;
cm="job140";
sc="/mnt/sdc2/job140.sh";
un="root";
tho=100;
wth=50;
ex="mmm194";
}
}
}
unit=jg2,,jp1admin,;
{
ty=g;
cm="jg2";
el=jobnet1,n,+0+0;
op=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
op=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=job120,j,+240+144;
sd=1,2019/11/03;
st=1,17:55;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
rg=99;
ex="mmm194";
ncl=y;
ncn=/jg1/jobnet1/jc1;
ncs=y;
unit=job120,,jp1admin,;
{
ty=j;
cm="job120";
sc="/mnt/sdc2/job120.sh";
un="root";
tho=100;
wth=50;
ex="mmm194";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajskill -F AJS3SCHEDULE001 "/*/*"
/opt/jp1ajs2/bin/ajsleave -F AJS3SCHEDULE001 "/*/*"
/opt/jp1ajs2/bin/ajsdefine -F AJS3SCHEDULE001 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsprint -F AJS3SCHEDULE001 -s yes "/*"
/opt/jp1ajs2/bin/ajsentry -F AJS3SCHEDULE001 -f /jg1/jobnet1
/opt/jp1ajs2/bin/ajsentry -F AJS3SCHEDULE001 -f /jg2/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJS3SCHEDULE001 -s "/*/*"

vim /root/unitbackup.txt

unit=jg1,,jp1admin,;
{
ty=g;
cm="jg1";
el=jobnet1,n,+0+0;
op=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
op=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=job130,j,+560+240;
sd=1,2019/11/01;
st=1,17:54;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
rg=99;
ex="mmm194";
ncl=y;
ncn=/jg1/jobnet1/jc2;
ncs=y;
ncex=y;
nchn="mmm190";
ncsv=AJS3SCHEDULE001;
unit=job130,,jp1admin,;
{
ty=j;
cm="job130";
sc="/mnt/sdc2/job130.sh";
un="root";
tho=100;
wth=50;
ex="mmm194";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajskill -F AJSROOT2 "/*/*"
/opt/jp1ajs2/bin/ajsleave -F AJSROOT2 "/*/*"
/opt/jp1ajs2/bin/ajsdefine -F AJSROOT2 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsprint -F AJSROOT2 -s yes "/*"
/opt/jp1ajs2/bin/ajsentry -F AJSROOT2 -f /jg1/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJSROOT2 -s "/*/*"

/opt/jp1ajs2/bin/ajsshow -F AJS3SCHEDULE001 -f" %J %i %G %B" -b 2019/11/23 -e 2019/11/25 "/*/*"
/opt/jp1ajs2/bin/ajsshow -F AJSROOT2 -f" %J %i %G %B" -b 2019/11/23 -e 2019/11/25 "/jg1/*"

tail -f /mnt/sdc2/job.log