1748040 Members
4556 Online
108757 Solutions
New Discussion юеВ

Cron Question?

 
Allanm
Super Advisor

Cron Question?


I want to run a script B 30 mins after script A, is the following the correct implementation -

49 */8 * * * A.pl
19 */9 * * * B.sh

Please guide.

Thanks,
Allan
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Cron Question?

The '*/8' syntax is not valid in HP-UX. That is a Linux only thing.

If you want to run A.pl at 8:49 and B.sh at 9:19, then:

49 8 * * * A.pl
19 9 * * * B.sh

James R. Ferguson
Acclaimed Contributor

Re: Cron Question?

Hi Allan:

The syntax you specified is a GNU (Linux) syntax not recognized by HP-UX.

You could have "script-A" 'sleep' for 1800 seconds (30-minutes) and thrn run "script-B" or you could have "script-A" issue:

at -f /home/script_B NOW +30 minutes

...to launch it.

Regards!

...JRF...
Bijeesh
Respected Contributor

Re: Cron Question?

Hi,

In hp the syntax you given will not work.Here is the syntax.
And this will work on everyday.

49 8 * * * A.pl
19 9 * * * B.sh
Allanm
Super Advisor

Re: Cron Question?

Can this question be moved to the linux forum instead coz it was meant to be a linux questions. We work in a hybrid model so please excuse me for posting it in wrong forum.

Allanm
Super Advisor

Re: Cron Question?

So how would this be can be implemented in Linux.

Thanks,
Allan
Bijeesh
Respected Contributor

Re: Cron Question?

hi
I think the same format that i have given will work in Linux also.