LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2003, 01:03 PM   #1
jlinden
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
Question 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!
 
Old 09-02-2003, 03:10 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You will need to make the file executeable:
chmod 700 /var/scripts/cronupdsysklog2
 
Old 09-02-2003, 06:19 PM   #3
jlinden
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Original Poster
Rep: Reputation: 0
That did it. Thanks!
 
Old 09-02-2003, 07:56 PM   #4
bkerensa
Member
 
Registered: Aug 2003
Location: Portland, OR
Distribution: Ubuntu
Posts: 42

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

I R TEH PHP GOD
 
Old 09-03-2003, 12:23 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Use php and loops instead of cron? For what reason?

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cron problems deadite66 Linux - General 0 08-06-2005 06:29 PM
Cron Problems DNAphil Linux - Newbie 1 07-12-2005 07:56 AM
cron problems tassinari Linux - Newbie 8 04-02-2005 10:11 PM
CRON problems jlinden Linux - General 1 09-02-2003 02:16 PM
Cron problems goochable Linux - Newbie 3 04-17-2001 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration