LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CRON problems (https://www.linuxquestions.org/questions/linux-newbie-8/cron-problems-88476/)

jlinden 09-02-2003 02:03 PM

CRON problems
 
I am trying to setup a cron task to run that will update a MySQL table, here is how I have it setup:

*/1 * * * * /var/scripts/cronupdsysklog2


Here is the conupdsysklog2 script file:

mysql -u * --password=* syslog < /var/scripts/updsysklog2

If I run 'sh conupdsysklog2' it works just fine. but every time cron runs (every minute) i get:

From root@idsconsole.schulman.com Tue Sep 2 14:02:01 2003
Date: Tue, 2 Sep 2003 14:02:01 -0400
From: root@idsconsole.schulman.com (Cron Daemon)
To: root@idsconsole.schulman.com
Subject: Cron <root@idsconsole> /var/scripts/cronupdsysklog2
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>

/bin/sh: line 1: /var/scripts/cronupdsysklog2: Permission denied


Any ideas??

Thanks!

david_ross 09-02-2003 04:10 PM

You will need to make the file executeable:
chmod 700 /var/scripts/cronupdsysklog2

jlinden 09-02-2003 07:19 PM

That did it. Thanks!:D

bkerensa 09-02-2003 08:56 PM

I also might reccomend just using php and have loops :D yes loops can fail to loop but its better then cronning :D

I R TEH PHP GOD

david_ross 09-03-2003 01:23 PM

Use php and loops instead of cron? For what reason?

I can't see what you would gain from that.


All times are GMT -5. The time now is 04:16 AM.