Skip to main content
Version: 10.3.1

Schedule jobs

This guide describes jobs that supervisord executes on corresponding servers at scheduled time.

  • It's assumed that the INSTALL_DIR variable has /opt/workfusion as the default value.

  • The scheduled time is specified in the {{ supervisord_home }}/conf/cron.sh file.

  • Events that trigger executing the cron.sh file are specified in {{ supervisord_home }}/conf/supervisord.conf.

Master

  1. Logrotate.

    /usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1
  2. Logstash 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>&1
  3. Logstash 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

  1. Logrotate.

    /usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1
  2. Mesos clean runtime directory.

    /usr/bin/find /opt/workfusion/mesos/runtime/containers/* -delete > /dev/null 2>&1
  3. Clear VDS services temp files.

    find /opt/workfusion/tmp/*  -mtime +3  -delete

Agent

  1. Logrotate.

    /usr/sbin/logrotate -s /opt/workfusion/logrotate/status /opt/workfusion/logrotate/logrotate.conf > /dev/null 2>&1
  2. Mesos clean runtime directory.

    /usr/bin/find /opt/workfusion/mesos/runtime/containers/* -delete > /dev/null 2>&1
  3. Clear 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