Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to set up a cron job

How to set up a cron job

How to set up a cron job

Trying to set up a cron job on a solaris system to run a script
bash-3.2$ sudo crontab -e
15****/usr/openv/scripts/nbmonitor  >/nbmonitor/nbmonitor_out 2>&1                                                                         ?



The crontab file was not changed.

Can someone tell me what I am doing wrong?



RE: How to set up a cron job

There are several threads on this forum (and others) for setting up cron jobs.  Have you tried searching for 'cron' and/or 'crontab' and/or 'cronjob' ?

Personally, I don't advise using crontab -e as I have seen large crontab entries 'blanked out'.

   crontab -l > /tmp/mycron.txt
   vi /tmp/mycron.txt
   crontab /tmp/mycron.txt

I hope that helps.


RE: How to set up a cron job

Looks to me that your default editor is set to ed. Do an:

export EDITOR=vi

(maybe put this in your startup profile for the future?)

and then try to crontab -e it and things should be clearer.
That said, I would echo Mike's advice re. copying first then applying the copy once you're happy with it, particularly if you're not really au-fait with vi itself.

Some days are diamonds, some days are rocks - make sure most are the former.

RE: How to set up a cron job

Thanks both suggestions were helpful  

RE: How to set up a cron job

Thanks for the star - glad to help.

Some days are diamonds, some days are rocks - make sure most are the former.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close