cancel
Showing results for 
Search instead for 
Did you mean: 

crontab entry

arun khatwani
Frequent Advisor

crontab entry

if i want to schedule the script in crontab that it runs every sunday at 4 am and stops at 6 am would it be fine or need to be chnaged.
0 4 * * 0 /usr/sap/POP/SYS/exe/run/startsap
0 6 * * 0 /usr/sap/POP/SYS/exe/run/stopsap
7 REPLIES
Taifur
Respected Contributor

Re: crontab entry

Hi Arun

Yes, it is fine.

No need to change.

Rgds//
Taifur
Shahul
Esteemed Contributor

Re: crontab entry

Hi,

Yes, you need to put it in the right user's crontab. Also please note that both the programs (startsap & stopsap) starts on 4AM and 6AM respectively. I am asuming "stopsap" is the program to stop "startsap"

Good Luck
Shahul
Avinash20
Honored Contributor

Re: crontab entry

The script seems to be fine

Also you could redirect the output to some file, so that in case if the script doesnt run fine, its easy to troubleshoot

0 4 * * 0 /usr/sap/POP/SYS/exe/run/startsap > /tmp/startsap.out
0 6 * * 0 /usr/sap/POP/SYS/exe/run/stopsap > /tmp/stopsap.out
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: crontab entry

Also give a small thought..
In case if the stopsap doesn't stop due to some reasons. Then there would be multiple instance of sap running

If startsap script pop up that SAP is already running then the above script is fine.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Arturo Galbiati
Esteemed Contributor

Re: crontab entry

hi,
this is fine.
Rgds,
Art
點燃
Valued Contributor

Re: crontab entry

Looks fine.

0 4 * * 0 /usr/sap/POP/SYS/exe/run/startsap > /tmp/startsap.out
0 6 * * 0 /usr/sap/POP/SYS/exe/run/stopsap > /tmp/stopsap.out
Man's mind, once stretched by a new idea, never regains its original dimensions
Suraj K Sankari
Honored Contributor

Re: crontab entry

HI,
0 4 * * 0 /usr/sap/POP/SYS/exe/run/startsap > /tmp/startsap.out
0 6 * * 0 /usr/sap/POP/SYS/exe/run/stopsap > /tmp/stopsap.out

yes its looks fine One thing I wana to tell give 2 >> instead 1 this will track a record of your SAP start and stop log

0 4 * * 0 /usr/sap/POP/SYS/exe/run/startsap >> /tmp/startsap.out
0 6 * * 0 /usr/sap/POP/SYS/exe/run/stopsap >> /tmp/stopsap.out

Suraj