We help IT Professionals succeed at work.

IRIX cron, How do I set one up?

rickyr
rickyr asked
on
Medium Priority
512 Views
Last Modified: 2013-12-16
Hiya...
I need to set a cron entry for root on an IRIX system.
How do I go about this? I already got my script that I want to run at midnight every day except Saturday. It is to perform an rdump to a Solaris Tape Server.

regards.
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
(crontab -l; echo '0 0 * * 0-5       script') | crontab

Commented:
You can also type
crontab -e
and edit what appears including a line like the suggested in the comment by ozo.
Be sure to set the environmenr variable EDITOR like this Assuming your favorite editor is emacs, if not put vi or whatever you use):
EDITOR=emacs or setenv EDITOR emacs
I dont know how complicated is you script, but if it includes only one dump command you can include this directly in the crontab.
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
What version of IRIX are we talking about?
crontab -e
works with a sufficiently recent IRIX.
I'd pesonally prefer to edit in any version,
(but then that makes the answer harder to explain:-)

Commented:
It is IRIX 6.2 ...
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
jlms, I'm curious, how did you determine that? I don't see how to tell from the question.
Did rickyr mention it in a previous question?
Or have you had personal contact with rickyr?

Author

Commented:
Hiya jlms...
Sorry, I should have said that I got IRIX 5.3. I tried what you said....
# crontab -e
      usage is:
      crontab [ file | -l -r ]
also tried...
# crontab root
      usage is:
      crontab [ file | -l -r ]
also tried...
# crontab root -l
      usage is:
      crontab [ file | -l -r ]

The script does the following....
for i in dumpvol1 dumpvol2
do
rdump......etc
done

regard

Commented:
Then the comment of ozo should be the right answer! Did you try it?
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
`man crontab` could tell you even more about the usage
But even in absence of a -e flag, I think I'd prefer to edit:

su
emacs /var/spool/cron/crontabs/root
crontab /var/spool/cron/crontabs/root
crontab -l

Author

Commented:
Hiya....
I did

#crontab -l > root.cron
#vi root.cron
--->edit file here<---
#cat root.cron | crontab

the last bit was from ozo's comment,
so you can come back for your points.

regards
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015
Commented:
#crontab -l > root.cron
#vi root.cron
--->edit file here<---
#crontab root.cron

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Hiya...

You're original comment was the one that
put me in the right direction as to how IRIX handles cron entries.

Thanks for your time ozo! yours too jlms.

regards
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.