Cronjob features on Gentoo

From XtremWebCH Wiki

Jump to: navigation, search
About the Cronjob
Cronjob on Gentoo
Cronjob on Window
Cronjob on Linux
Cronjob for the dispatcher
Cronjob for the worker
Cronjob for the relay
Cronjob for the database

On the Gentoo platform, some specials cronjob features are available. These features ensure that, even in case of fault with the Worker or the Relay, the system can continue to work. This is achieve by using a cronjob that occur every minute and check that the Worker or the Relay are working. If the Worker or the Relay are not working anymore, the cronjob restart the application. Please be aware that the cronjob run as root user.

How to change the rate that the auto reboot job occur

As explain before, the auto reboot job occur every minute. If you find it is too fast, you can change this rate.

For the Worker

Edit the file /etc/init.d/xtremwebclient and locate the line that contains

((crontab -u root -l||echo "") | grep -v "xtremwebclient" | egrep -v "^#" ; echo '* * * * * (source /etc/profile.env ; export PATH=/sbin:/bin:/usr/bin:$PATH;/etc/init.d/xtremwebclient check || (/etc/init.d/xtremwebclient reload)) 1>>/var/log/xtremwebclient/reboot.log 2>&1') | crontab -u root - 

and change the part with the star (using the default notation for cronjob)

For the Relay

Edit the file /etc/init.d/xtremwebrelais and locate the line that contains

((crontab -u root -l||echo "") | grep -v "xtremwebrelais" | egrep -v "^#" ; echo '* * * * * (source /etc/profile.env ; export PATH=/sbin:/bin:/usr/bin:$PATH;/etc/init.d/xtremwebrelais check || (/etc/init.d/xtremwebrelais reload)) 1>>/var/log/xtremwebrelais/reboot.log 2>&1') | crontab -u root - 

and change the part with the star (using the default notation for cronjob)

Personal tools