cron question

cron question

Post by Travi » Fri, 18 Apr 2003 05:49:25



I am trying to automate an update on our prohelp system with our AS/400. I
have created a script to do this, it simply grabs a file that the 400 pushes
to UNIX via ftp. The problem I am having is this, I want to set this up to
run, say, on a weekly basis, so I should use cron, right. (forgive me, I'm
fairly new) When I make the entries into the cron file (and there are others
in there) and exit, it does not save my changes. Any ideas what is going on?
Yes, I am logged in as root.

Thanks,

 
 
 

cron question

Post by scriptOmati » Fri, 18 Apr 2003 06:12:10



> I am trying to automate an update on our prohelp system with our AS/400. I
> have created a script to do this, it simply grabs a file that the 400 pushes
> to UNIX via ftp. The problem I am having is this, I want to set this up to
> run, say, on a weekly basis, so I should use cron, right. (forgive me, I'm
> fairly new) When I make the entries into the cron file (and there are others
> in there) and exit, it does not save my changes. Any ideas what is going on?
> Yes, I am logged in as root.

> Thanks,

What are you using to edit the cron tab with?
Typically
        crontab -e
yes?
Are you getting any errors?

--
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

 
 
 

cron question

Post by Travi » Fri, 18 Apr 2003 06:16:17




> > I am trying to automate an update on our prohelp system with our AS/400.
I
> > have created a script to do this, it simply grabs a file that the 400
pushes
> > to UNIX via ftp. The problem I am having is this, I want to set this up
to
> > run, say, on a weekly basis, so I should use cron, right. (forgive me,
I'm
> > fairly new) When I make the entries into the cron file (and there are
others
> > in there) and exit, it does not save my changes. Any ideas what is going
on?
> > Yes, I am logged in as root.

> > Thanks,
> What are you using to edit the cron tab with?
> Typically
> crontab -e
> yes?
> Are you getting any errors?

> --
> http://ftp.opensysmon.com is a shell script archive site with an
> open source system monitoring and network monitoring software package.
> Many platforms are supplied already compiled.

Yes, that is how I am doing it, and no I am not seeing any errors, other
than when I first open it up I see this
vi /tmp/crontaba0059S
%s not owned by you - ignoring
 not owned by you - ignoring
 
 
 

cron question

Post by scriptOmati » Fri, 18 Apr 2003 07:36:29






> > > I am trying to automate an update on our prohelp system with our AS/400.
> I
> > > have created a script to do this, it simply grabs a file that the 400
> pushes
> > > to UNIX via ftp. The problem I am having is this, I want to set this up
> to
> > > run, say, on a weekly basis, so I should use cron, right. (forgive me,
> I'm
> > > fairly new) When I make the entries into the cron file (and there are
> others
> > > in there) and exit, it does not save my changes. Any ideas what is going
> on?
> > > Yes, I am logged in as root.

> > > Thanks,
> > What are you using to edit the cron tab with?
> > Typically
> > crontab -e
> > yes?
> > Are you getting any errors?

> > --
> > http://ftp.opensysmon.com is a shell script archive site with an
> > open source system monitoring and network monitoring software package.
> > Many platforms are supplied already compiled.

> Yes, that is how I am doing it, and no I am not seeing any errors, other
> than when I first open it up I see this
> vi /tmp/crontaba0059S
> %s not owned by you - ignoring
>  not owned by you - ignoring

Ok,
That seems to be the problem.
The crontab -e program is running "vi" by default and/or because
that is what your EDITOR environment variable is set to (also some
systems look at the VISULA environment variable).

vi is having problems because, I think, you have "su"'ed to become
root, correct?

Try logging in as root and see if this fixes it.  

Also, if you are doing an "su" besure to do this:
        su -
so that you get a true root environment.  Without the "-"
you do not get a true (or complete) root environment.

--
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

 
 
 

1. cron question

I am running Solaris 2.6 but I think this will carry over to others as
well.

In cron I have a script that should redirect output to a file with the
date appended to the filename.  Like so:

15 4 * * 3 script > /my/home/dir/file-`date '+%m.%d.%y'` 2>&1

This only produced the filename "file-" and no date.  So after reading
up on crontab a little more I noticed that % is a newline character.
Ok, so I'll escape it with "\".  Problem solved.  So then crontab
looked like so:

15 4 * * 3 script > /my/home/dir/file-`date '+\%m.\%d.\%y'` 2>&1

Alas, not the complete answer.  Now I get a filename that looks like
"filename-\08.\31.\99.  Not exactly what I was looking for but closer.

Someone knows what I'm doing wrong, would that someone please point it
out?

Thanks,

~Jeff

2. forgot passwd on solaris

3. bsdi cron question

4. Floppy Disk Driver

5. Another cron question

6. Staroffice 3.1

7. Cron question

8. 2.0.31 memory problem

9. cron question

10. Scan a Directory/cron question

11. cron question

12. another cron question