Operating System - HP-UX
1748209 Members
2885 Online
108759 Solutions
New Discussion юеВ

Re: substitute of cron jobs!!

 
SOLVED
Go to solution
astra
Frequent Advisor

substitute of cron jobs!!

Hi All,

Is there any guidelines which needs to be taken care in order to use the crons efficiently??

Please also mention that, Is there any substitute available like cron in Hp-UX??

Regards,
Amit
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: substitute of cron jobs!!

Amit,

Sorry, I'm not really sure what you're asking with your first question.

In regard to your second, however, you can use at to substitute for cron. Some thing like this:

echo "/full/path/myscript" | at 02:00 tomorrow

Putting that line in /full/path/myscript will reschedule myscript every time myscript is run.

Other than that you would probably need to look into some sort of job scheduler software.


Pete

Pete
OldSchool
Honored Contributor

Re: substitute of cron jobs!!

"Is there any guidelines which needs to be taken care in order to use the crons efficiently??"

planning? I guess it depends on what you mean by "using effieciently". cron is what it is, a time-based scheduler.

"Please also mention that, Is there any substitute available like cron in Hp-UX??"

try googling "unix cron replacement". you'll get bunches of hits.

There are also commercial-available tools that are far more advanced than cron that have more options, like ControlM and Dollar Universe.

Again, it depends on what you want to do.....and why you think you may need to / want to "replace" cron
Rita C Workman
Honored Contributor
Solution

Re: substitute of cron jobs!!

Using cron efficiently.

How about controlling who has rights to run via cron (cron.allow)?
How about making sure your cronjobs are current, and not polluted with old jobs or pointing to no longer existing 'things' you don't need running anymore?
How about consolidating some jobs, like some HPUX cleanup jobs put into one script?
How about making sure if your running a high available environment that all the boxes have everything in cron they need?
How about making sure you have backup copies of your root cron? Remember it's just a file and it too can be corrupted.

If you want to purchase some third party vendor to schedule jobs, that's an option. But I tend to keep those pieces of software for apps jobs, while keeping HPUX Admin stuff within cron.

Just some thoughts,
Rita
But each to his (or her) own.
Viktor Balogh
Honored Contributor

Re: substitute of cron jobs!!

>Please also mention that, Is there any substitute available like cron in Hp-UX??

Why would you want that? Replacing a solid, trustworthy tool with a newly-created buggy one from a 3rd party?

If you are masochistic, you could write your own scheduler, it's basically an infinite while loop checking a queue list every second. But i would skip with this idea and stay with the good'ol cron. ;)
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: substitute of cron jobs!!

>Is there any guidelines

it occurs to me another thing: if you are using Serviceguard, then the cronjobs of the 'package user' (the user in which name of the application starts, eg. oraSID) should be stored on the shared disk. So, when the package started the cron will be pulled from an external file:

$ crontab cronfile

and by stopping the package the cron will be exported back to the file and after that removed like this:

$ crontab -l > cronfile
$ crontab -e

****
Unix operates with beer.
astra
Frequent Advisor

Re: substitute of cron jobs!!

Thank you all!!