logrotate and cron

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

logrotate and cron

Postby Dima85 » Sat Sep 22, 2012 8:27 am

$this->bbcode_second_pass_code('', '[root@home_s ~]# logrotate -f /etc/logrotate.conf')
Work!

------
I'm add this to cron:
$this->bbcode_second_pass_code('', '[root@home_s ~]# crontab -l
0 23 * * * logrotate -f /etc/logrotate.conf')
cron.log:
$this->bbcode_second_pass_code('', 'Sep 21 23:00:02 home_s /USR/SBIN/CROND[24037]: (root) CMD (logrotate -f /etc/logrotate.conf)
Sep 21 23:00:02 home_s /USR/SBIN/CROND[24036]: (root) CMDOUT (/bin/sh: logrotate: command not found)
Sep 21 23:00:02 home_s /USR/SBIN/CROND[24038]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory
Sep 21 23:00:02 home_s /USR/SBIN/CROND[24036]: (root) MAIL (mailed 38 bytes of output but got status 0x0001')

Please help, what is not work?
Dima85
 
Posts: 24
Joined: Fri Jul 27, 2012 7:15 am

Re: logrotate and cron

Postby pepedog » Sat Sep 22, 2012 8:57 am

Full paths in cron
(A guess, it might be in sbin)
/usr/bin/logrotate -f /etc/logrotate.conf
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: logrotate and cron

Postby Dima85 » Sat Sep 22, 2012 9:16 am

Thanks!
Dima85
 
Posts: 24
Joined: Fri Jul 27, 2012 7:15 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 6 guests