Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to Linux. I put a file in cron.daily to test, but it never got execute, access mod is 755 for the test file.

crontab file has the default entry of: -*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1

cron daemon is there. I can start a "at" job.

What do I miss ?

share|improve this question
    
This file that you've placed is a bash script? And what does the logs say? –  Andrejs Cainikovs Jun 8 '11 at 17:05
    
What does the actual cron script look like? –  slashdot Jun 9 '11 at 14:06
add comment

1 Answer 1

Your script has .sh suffix doesn't it? ;)

run-parts doesn't run anything with any suffix. Files with suffix are silently ignored.

This is a documented but utterly stupid "feature":

If neither the --lsbsysinit option nor the --regex option is given then the names must consist entirely of upper and lower case letters, dig‐ its, underscores, and hyphens.

share|improve this answer
    
Actually no. The file name is test-it and it has one line in there just say "touch /tmp/x " –  Ed Kwan Jun 9 '11 at 14:44
    
Try running run-crons manually and look in it's man page. See if it has a verbose flag or strace it. –  jkj Jun 11 '11 at 0:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.