LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   /USR/SBIN/CRON --> Suspicious Capital Letter, cron is not working??? (https://www.linuxquestions.org/questions/linux-server-73/usr-sbin-cron-suspicious-capital-letter-cron-is-not-working-4175411531/)

arfal 06-14-2012 10:02 PM

/USR/SBIN/CRON --> Suspicious Capital Letter, cron is not working???
 
Hi,

Found one similar thread in linuxquestions.org:
http://www.linuxquestions.org/questi...reezes-624792/

But still not getting the answer. I'm using opensuse 12.1 64 bit, put a crontab from root but it is not running, here's the log:

Code:

Jun 15 09:58:01 ns2 /USR/SBIN/CRON[28124]: (root) CMD (/bin/rm -rf /var/spool/amavis/tmp/*)
I wonder the /USR/SBIN/CRON is in capital letter maybe that's why it doesn't work. Please help..

unSpawn 06-15-2012 12:09 AM

Quote:

Originally Posted by arfal (Post 4703669)
put a crontab from root but it is not running, here's the log

OK but what's the root crontab contents? And did you edit it as root and with 'crontab -e' or differently? (I've never noticed all-caps logging but if the other thread says it denotes cron daemon child processes...)

arfal 06-16-2012 10:30 PM

Yes, I put it using crontab -e from root

unSpawn 06-17-2012 04:30 PM

Seeing you answered at least one question I'm just going to suggest you use 'tmpwatch' instead.

arfal 06-20-2012 04:58 AM

hello, this is my crontab looks like:

Quote:

ns2:~ # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (crontab.txt installed on Sat Nov 12 06:43:40 2011)
# (Cronie version 4.2)
* * * * * /usr/local/ispconfig/server/server.sh &> /dev/null
30 00 * * * /usr/local/ispconfig/server/cron_daily.sh &> /dev/null
#0 */2 * * * sync.sh
#0 */3 * * * notification.sh
0 */3 * * * spamlogclean.sh
#00 23 * * * /usr/bin/skychainmailerRemover.sh
*/2 * * * * mailerRemover.sh
*/2 * * * * /bin/rm -rf /var/spool/amavis/tmp/*
ns2:~ #
None of those crontab were work

skipper123 06-20-2012 11:44 AM

crontab daemon should be running in order to run the stuff that you have added on crontab.

try rccron restart

I hope it helps

arfal 06-21-2012 04:06 AM

Hello, thanks for your reply. I have restart rccron but still no luck, in /var/log/message the /USR/SBIN/CRON still in capital letter which not working:

Quote:

ns2:~ # rccron restart
redirecting to systemctl
ns2:~ # tail -f /var/log/messages
Jun 21 16:02:01 ns2 /USR/SBIN/CRON[24857]: (root) CMD (mailerRemover.sh)
Jun 21 16:02:01 ns2 /USR/SBIN/CRON[24855]: (root) CMD (/bin/rm -rf /var/spool/amavis/tmp/*)
^C
ns2:~ # ll /var/spool/amavis/tmp/
total 8
drwxr-x--- 3 vscan vscan 4096 Jun 21 16:05 amavis-20120621T160519-25347-nLH4KoqJ
drwxr-x--- 3 vscan vscan 4096 Jun 21 16:05 amavis-20120621T160529-25354-EprnWWrz
ns2:~ #
confusing...

Habitual 06-21-2012 09:27 AM

While -fr may work, I have never used it to empty a directory.
Code:

rm /var/spool/amavis/tmp/*
should empty the contents of /var/spool/amavis/tmp/

rknichols 06-21-2012 12:11 PM

Quote:

Originally Posted by arfal (Post 4708366)
Hello, thanks for your reply. I have restart rccron but still no luck, in /var/log/message the /USR/SBIN/CRON still in capital letter which not working:
ns2:~ # rccron restart
redirecting to systemctl
ns2:~ # tail -f /var/log/messages
Jun 21 16:02:01 ns2 /USR/SBIN/CRON[24857]: (root) CMD (mailerRemover.sh)
Jun 21 16:02:01 ns2 /USR/SBIN/CRON[24855]: (root) CMD (/bin/rm -rf /var/spool/amavis/tmp/*)
^C
ns2:~ # ll /var/spool/amavis/tmp/
total 8
drwxr-x--- 3 vscan vscan 4096 Jun 21 16:05 amavis-20120621T160519-25347-nLH4KoqJ
drwxr-x--- 3 vscan vscan 4096 Jun 21 16:05 amavis-20120621T160529-25354-EprnWWrz
ns2:~ #

Note that the timestamps on those directories is 3 minutes after the cron job ran. Looks to me like the tmp directory was indeed cleared, and those two directories were created later.

Habitual 06-21-2012 03:33 PM

Quote:

Originally Posted by arfal (Post 4703669)
...I wonder the /USR/SBIN/CRON is in capital letter maybe that's why it doesn't work. Please help..

Nope. That's just the /var/log/messages format.
Here's my /var/log/messages from a working cron:
Code:

Jun 21 16:21:01 localhost /USR/SBIN/CRON[30914]: (jj) CMD (/home/jj/Documents/cirrhus9/Accounts/Norveld/3WeekTest/norveldchk2.sh > /dev/null 2>&1)
Edit: OpenSUSE 11.4 here. :)

catkin 06-22-2012 06:40 AM

Quote:

Originally Posted by Habitual (Post 4708570)
While -fr may work, I have never used it to empty a directory.
Code:

rm /var/spool/amavis/tmp/*
should empty the contents of /var/spool/amavis/tmp/

Except for any files or directories with names beginning with a .


All times are GMT -5. The time now is 10:16 PM.