LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 03-20-2012, 07:59 AM   #1
annotate
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Rep: Reputation: Disabled
Problem is (bad minute) error


I get an email from server log each morning. This is being reported (see below). Below that is the refresh.apf file. What is my problem. Thanks.


**Unmatched Entries**
Mar 19 04:03:01 server crond[24531]: CRON: error in (/etc/cron.d/refresh.apf) problem is (bad minute)


refresh.apf file is below

MAILTO=
SHELL=/bin/sh
*/10 * * * * root /etc/apf/apf --refresh >> /dev/null 2>&1 &
 
Old 03-20-2012, 08:29 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,602

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Distro?
Version?

Have you tried using 00,10,20,30,40,50 for the minutes instead?
 
Old 03-20-2012, 08:40 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Is /etc/cron.d/refresh.apf a normal (Linux) text file or a windows generated text file?

Post the output of:
Code:
file /etc/cron.d/refresh.apf
Hope this helps.
 
Old 03-20-2012, 09:53 AM   #4
annotate
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
TenTenths, Red Hat Enterprise Linux Server release 5.2 (Tikanga).

No, but I will try that. Thanks for your reply.

druuna, the file contents are in my first post. Thanks.
 
Old 03-20-2012, 10:25 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by annotate View Post
druuna, the file contents are in my first post. Thanks.
The contents is, but not the output of the command I asked for.....

Execute this from the command line and post the output: file /etc/cron.d/refresh.apf
 
Old 03-20-2012, 11:20 AM   #6
annotate
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
druuna, here it it.

/etc/cron.d/refresh.apf: symbolic link to `/etc/apf/internals/cron.refresh'
 
Old 03-20-2012, 11:25 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by annotate View Post
druuna, here it it.

/etc/cron.d/refresh.apf: symbolic link to `/etc/apf/internals/cron.refresh'
That points to a link, what is the output of the file command when using the file it points to:
Code:
file /etc/apf/internals/cron.refresh
 
Old 03-20-2012, 11:34 AM   #8
annotate
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
/etc/apf/internals/cron.refresh: ASCII text
 
Old 03-20-2012, 12:01 PM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by annotate View Post
/etc/apf/internals/cron.refresh: ASCII text
That seems to be correct.

Can you post the output (between [code] [/code] tags) of the following command:
Code:
od -c /etc/apf/internals/cron.refresh
Maybe a stray character is present, the above command should show this.
 
Old 03-20-2012, 12:41 PM   #10
annotate
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
[root@server ~]# od -c /etc/apf/internals/cron.refresh
0000000 M A I L T O = \n S H E L L = / b
0000020 i n / s h \n * / 1 0 * * *
0000040 * r o o t / e t c / a p f
0000060 / a p f - - r e f r e s h >
0000100 > / d e v / n u l l 2 > & 1
0000120 & \n
0000123
 
Old 03-20-2012, 12:56 PM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Please put your script/data inside [code] ... [/code] tags it preserves all spacing. If you don't know how: LQ - BB Code List.
 
Old 03-25-2012, 01:17 PM   #12
NA2012
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
I am also seeing the same thing in my logs. Did you find a fix for this?

Also, I don't understand the use of "root" in the cron entry:

*/10 * * * * root /etc/apf/apf --refresh >> /dev/null 2>&1 &

I thought the syntax should be {5 fields for time} {command}. So what does the "root" entry do there? If I remove "root", the format would match what I expect it to match.

thanks for any tips,
 
Old 03-25-2012, 10:02 PM   #13
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
For system (root) level cron files, you have the option to specify the user to run the job as.
Of course if that's the same user as the job owner, it would be redundant, unless the cmd-to-run has setuid bit set on.
 
Old 03-25-2012, 10:28 PM   #14
NA2012
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
Interesting, thanks for letting me know.

If anyone figures out the cause for this error, or has additional tips on how to figure it out, would be great to hear.

thanks,
 
Old 04-30-2012, 08:03 PM   #15
Catalyst
LQ Newbie
 
Registered: Apr 2012
Location: Knoxville, TN
Distribution: RHEL/CentOS
Posts: 1

Rep: Reputation: Disabled
Delete:
Code:
MAILTO=
SHELL=/bin/sh
And voila!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mount: wrong fs type, bad option, bad superblock missing codepage or other error twaddlac Linux - Virtualization and Cloud 3 09-29-2010 10:24 AM
bad minute error adding a crontab job htamayo Linux - Newbie 7 03-15-2010 09:56 AM
I get this annoying kernel error several times a minute mandrakethepenguin Linux - Hardware 2 08-05-2006 03:20 AM
mail log reporting error every minute kwingate Fedora 0 10-25-2004 10:07 PM
1 minute login error requirement STREETTEC Linux - Security 1 03-20-2003 11:47 AM


All times are GMT -5. The time now is 06:03 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration