Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: bigpcman on February 12, 2009, 10:35:59 AM

Title: stumped on preventing crond terminal message
Post by: bigpcman on February 12, 2009, 10:35:59 AM
I have a crond job running that I created with crontab -e which works fine.
cron job
Code: [Select]
*/15 * * * *  /mnt/sda1/myscript > /dev/null 2>&1
However, when I exit out of x to the tc command prompt (or bootup using "text") I see that every time crond executes the cron job it outputs a message to the terminal and then "hangs" requiring a cnt c to regain the terminal prompt.
Message
Code: [Select]
crond [5817]: USER root pid 6130 cmd  /mnt/sda1/myscript > /dev/null 2>&1
How do I correct this behavior?
Title: Re: stumped on preventing crond terminal message
Post by: Kingdomcome on February 12, 2009, 11:47:12 AM
you can edit the wrapper /etc/init.d/crond and add -L /dir/to/cron.log or -L /dev/null to the OPTIONS variable
Title: Re: stumped on preventing crond terminal message
Post by: bigpcman on February 12, 2009, 12:25:49 PM
you can edit the wrapper /etc/init.d/crond and add -L /dir/to/cron.log or -L /dev/null to the OPTIONS variable

Oh the "-L" option! I was starting crond in bootlocal.sh using crond > /dev/null 2>&1. I didn't know about -L so now when I use,
"crond -L /dev/null 2>&1" everthing works as it should. Thanks for the help.
Title: Re: stumped on preventing crond terminal message
Post by: hliauw on April 23, 2010, 12:45:31 PM
you can edit the wrapper /etc/init.d/crond and add -L /dir/to/cron.log or -L /dev/null to the OPTIONS variable


I tried this, but after reboot, the file reverted back to the original file with OPTIONS="-b". Does this file get a fresh copy on every boot?
Title: Re: stumped on preventing crond terminal message
Post by: maro on April 23, 2010, 03:04:55 PM
@hliauw: What kind of persistence do you use? The file in question (i.e. '/etc/init.d/crond') is by default not included in any backup.

So to include the changed file into the backup you'll need to add etc/init.d/crond to '/opt/.filetool.lst' (please note the lack of a leading forward slash). Afterwards you need to ensure that a backup is performed, and you should expect that the files gets restored as part of your reboot.
Title: Re: stumped on preventing crond terminal message
Post by: moB on April 07, 2011, 03:10:47 AM
you can edit the wrapper /etc/init.d/crond and add -L /dir/to/cron.log or -L /dev/null to the OPTIONS variable
"crond -L /dev/null 2>&1"
Kingdomcome, bigpcman,
 
Thanks for this!

moB

 I learned about free software as a way of life by joining a community of programmers who already lived it.
--rms