1753930 Members
10019 Online
108810 Solutions
New Discussion юеВ

Re: cron issue

 
Elmar P. Kolkman
Honored Contributor

Re: cron issue

newunix, what you want exactly what I described in the first reply...

If you want to do it for another user, you have to add the '-u ' option.

So:

$ crontab -l -u dummyuser >oldjobs
$ cat oldjobs newjobs | crontab -u dummyuser
Every problem has at least one solution. Only some solutions are harder to find.
rariasn
Honored Contributor

Re: cron issue

Hi:

# cd /var/spool/cron/crontabs

Save old cron.

# crontab -l > crontab.old

Modify crontab file:

# crontab -e

List crontab file:

# crontab -l

rgs,
Dennis Handly
Acclaimed Contributor

Re: cron issue

>rariasn: # cd /var/spool/cron/crontabs

There is no need to go there unless you want to back up these files.
Also don't edit these files directly.
Jim Walls
Trusted Contributor

Re: cron issue

newunix,

As a new UNIX user/administrator you need to quickly learn that "man" is your best friend...

man crontab

... will give you the the answer you need.

djoshi
Frequent Advisor

Re: cron issue

I know it's a old thread.

hi newunix,

If you are creating cron like vi xyz.cron, after adding all jobs to xyz.cron, you have to use below command to activate above crontab.
crontab xyz.cron

If you are adding more cron jobs to xyz.cron edit in vi and then again use crontab xyz.cron to activate.

Thx,
madhuchakkaravarthy
Trusted Contributor

Re: cron issue

hi djoshi
!its better to use crontab -e instead of vi

Regards
Mc