[CS-FSLUG] How to run a cron script?
Jerry VanBrimmer
jevb at runbox.com
Fri Dec 31 10:57:52 CST 2004
On Fri, Dec 31, 2004 at 08:45:21AM -0500, Frank Bax wrote:
> At 02:54 AM 12/31/04, Jerry VanBrimmer wrote:
>
> >I have this script, called rsync_demo, that I have put in ~/bin. I created
> >this script to download updates from a Slackware mirror and put them in
> >a folder on my machine. If I run the script manually from a terminal like
> >this:
> >
> >$ /home/jerry/bin/./rsync_demo.sh
> >
> >it works just fine and does exactly what I want.
> >
> >Trouble is, I can't get cron to run the script from my crontab.
>
>
> For myself, the most common cause for this is that path is not the same in
> crontab as it is in a terminal session. Try adding PATH= to the crontab,
> or specify full path to commands used inside your script.
I have added the path to ~/bin to "jerry"'s PATH. So I don't think
that's it. But, I'll try it anyway.
>
> Are you sure the problem is that the script does not run in cron, or is the
> problem that log file is not changed? Does 'jerry' has rights to write to
> /var/log/messages ?
Yes, I'm sure cron isn't running the script. Because I watch for it in
KDE System Guard. When I run it by hand it shows up in the list of
processes. When I wait for cron to run it, it never shows up.
You are right about one thing. User jerry does not have write perms on
/var/log/messages. Would it be okay to allow that, or should I direct
that output to another log, say to ~/rsync_log ?
>
>
> _______________________________________________
> ChristianSource FSLUG mailing list
> Christiansource at ofb.biz
> http://cs.uninetsolutions.com
>
--
The KING is coming!..................Rev. 1:7
The bottom line......................John 3:3-7
Linux User #153217..................http://counter.li.org
More information about the Christiansource
mailing list