Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Dennis on December 01, 2002, 02:59:40 PM

Title: Edit crontab
Post by: Dennis on December 01, 2002, 02:59:40 PM
Hi there,

how do I edit the crontab file?

It says :
/snip
#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates directory. For more
# information, see http://www.e-smith.org.
#
# copyright (C) 2001 Mitel Networks Corporation
#------------------------------------------------------------
\snip

And when I edit it, it runs great until a curtain time, where the system is updating the files, and the line I’ve added are gone again.


Can anyone point me in the right direction?

/ Dennis
Title: Re: Edit crontab
Post by: guestHH on December 01, 2002, 03:26:19 PM
http://www.e-smith.org/custom/
Title: Re: Edit crontab
Post by: Jesper on December 03, 2002, 05:19:43 PM
Dennis,

The below example inserts the command all-ip in the crontab. You have to create a custom template.


[root@e-smith ]# chmod 755 /etc/mrtg/all-ip

[root@e-smith ]# mkdir -p /etc/e-smith/templates-custom/etc/crontab/

[root@e-smith ]# echo "0-59/5 * * * * root /etc/mrtg/all-ip" > /etc/e-smith/templates-custom/etc/crontab/mrtg

[root@e-smith ]# /sbin/e-smith/expand-template /etc/crontab
Title: Re: Edit crontab
Post by: Dan Brown on December 03, 2002, 05:30:48 PM
Just FYI, this line:

[root@e-smith ]# echo "0-59/5 * * * * root /etc/mrtg/all-ip" > /etc/e-smith/templates-custom/etc/crontab/mrtg

could also be written as:

echo '*/5 * * * * ...