Schedule jobs
This guide describes jobs that supervisord executes on corresponding servers at scheduled time.
It's assumed that variable
INSTALL_DIRhas/opt/workfusionas the default value.The scheduled time is specified in the
{{ supervisord_home }}/conf/cron.shfile.Events that trigger executing the
cron.shfile are specified in{{ supervisord_home }}/conf/supervisord.conf.
Master
Logrotate.
/usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1Logstash gzip logs.
find /opt/workfusion/logs ! -name '*.gz' -type f -daystart -mtime +0 -exec gzip --suffix "."$(date +"\%Y-\%m-\%d_\%H:\%M:\%S")".gz" {} + > /dev/null 2>&1Logstash cleanup logs.
find /opt/workfusion/logs -mindepth 4 -maxdepth 4 -type d -mtime +7 -exec rm -rf {} + > /dev/null 2>&1
Master server
Logrotate.
/usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1
Master
Logrotate.
/usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1Mesos clean runtime directory.
/usr/bin/find /opt/workfusion/mesos/runtime/containers/* -delete > /dev/null 2>&1Clear VDS services temp files.
find /opt/workfusion/tmp/* -mtime +3 -delete
Agent
Logrotate.
/usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1Mesos clean runtime directory.
/usr/bin/find /opt/workfusion/mesos/runtime/containers/* -delete > /dev/null 2>&1Clear VDS services temp files.
find /opt/workfusion/tmp/* -mtime +3 -delete
OCR Server
Logrotate.
/usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1