MAILTO=philip@trade-ideas.com,michael@trade-ideas.com # MIN HOUR DAY MONTH DAYOFWEEK COMMAND 04 11 * * sat killall fast_alert_search_tl_ms 0 21 * * * cd /home/phil/cpp_alert_server/live_server/fast_alert_search/Logs; find . -maxdepth 1 -name 'log.*[0-9].tl_ms' -atime +10 -exec gzip -9v {} \; 2>>clean.txt ; find . -maxdepth 1 -name 'log.*.gz' -exec mv --no-clobber {} old \; # gzip -9v log.*[0-9].tl_ms # But ignore anything that is less than 10 days old or has been read in the last 10 days. # Also, find will not give you an error with an empty directory. # # When you copy this script you typically change two things: # * The directory you cd into and # * The file extension for the uncompressed logs, e.g. .tl_ms. # Moved to ~/cpp_alert_server/live_server/start_all #@reboot cd /home/phil/cpp_alert_server/live_server/fast_alert_search ; ./run_tl_ms