LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Problem is (bad minute) error (https://www.linuxquestions.org/questions/linux-server-73/problem-is-bad-minute-error-935448/)

annotate 03-20-2012 06:59 AM

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 &

TenTenths 03-20-2012 07:29 AM

Distro?
Version?

Have you tried using 00,10,20,30,40,50 for the minutes instead?

druuna 03-20-2012 07:40 AM

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.

annotate 03-20-2012 08:53 AM

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.

druuna 03-20-2012 09:25 AM

Hi,
Quote:

Originally Posted by annotate (Post 4631559)
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

annotate 03-20-2012 10:20 AM

druuna, here it it.

/etc/cron.d/refresh.apf: symbolic link to `/etc/apf/internals/cron.refresh'

druuna 03-20-2012 10:25 AM

Hi,
Quote:

Originally Posted by annotate (Post 4631641)
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

annotate 03-20-2012 10:34 AM

/etc/apf/internals/cron.refresh: ASCII text

druuna 03-20-2012 11:01 AM

Hi,
Quote:

Originally Posted by annotate (Post 4631657)
/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.

annotate 03-20-2012 11:41 AM

[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

druuna 03-20-2012 11:56 AM

Please put your script/data inside [code] ... [/code] tags it preserves all spacing. If you don't know how: LQ - BB Code List.

NA2012 03-25-2012 12:17 PM

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,

chrism01 03-25-2012 09:02 PM

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.

NA2012 03-25-2012 09:28 PM

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,

Catalyst 04-30-2012 07:03 PM

Delete:
Code:

MAILTO=
SHELL=/bin/sh

And voila!


All times are GMT -5. The time now is 06:29 AM.