PATH = /home/raj/apps/HILIS4/script:/usr/local/bin:/usr/bin:/bin

HOURLY=/home/raj/apps/HILIS4/script/crons/hourly
DAILY=/home/raj/apps/HILIS4/script/crons/daily
WEEKLY=/home/raj/apps/HILIS4/script/crons/weekly
MONTHLY=/home/raj/apps/HILIS4/script/crons/monthly
QUARTERLY=/home/raj/apps/HILIS4/script/crons/quarterly
YEARLY=/home/raj/apps/HILIS4/script/crons/yearly
MULTI=/home/raj/apps/HILIS4/script/crons/multi
CRON_LOG=/home/raj/crons/cron.log

# @hourly $HOURLY/sysmex.sh 2>&1   #Lantronix socket monitor
# @hourly HOST=hmds-lth /home/raj/www/cgi-bin/env.pl >> $CRON_LOG 2>&1

@daily $DAILY/log_rotate.pl >> $CRON_LOG 2>&1
@daily $DAILY/expire_sessions.pl 'leeds' 'uclh' >> $CRON_LOG 2>&1 #expires sessions on hilis4 sessions tables
@daily $DAILY/expire_user_accounts.pl 'leeds' 'uclh' >> $CRON_LOG 2>&1
@daily $DAILY/mail_reports.pl >> $CRON_LOG 2>&1
@daily $DAILY/chest_clinic_diagnosis_status_alert.pl >> $CRON_LOG 2>&1
@daily $DAILY/dlbcl_or_burkitt_diagnosis_alert.pl >> $CRON_LOG 2>&1
@daily $DAILY/incomplete_requests.pl >> $CRON_LOG 2>&1
@daily $DAILY/remodlb_alert.pl >> $CRON_LOG 2>&1
@daily $DAILY/juvenile_diagnosis_status_alert.pl >> $CRON_LOG 2>&1
@daily $DAILY/diagnosis_status_alerts.pl >> $CRON_LOG 2>&1
@daily $DAILY/ppm_and_results.pl >> $CRON_LOG 2>&1
@daily $DAILY/unauthorised.pl >> $CRON_LOG 2>&1
@daily $DAILY/histopathology_referrals.pl >> $CRON_LOG 2>&1
@daily $DAILY/new_national_code.pl >> $CRON_LOG 2>&1
@daily $DAILY/unscreened.pl >> $CRON_LOG 2>&1
@daily $DAILY/new_pnh_alert.pl >> $CRON_LOG 2>&1
@daily $DAILY/syncona-14mg.pl >> /home/raj/apps/HILIS4/logs/syncona-14mg.log 2>&1

@weekly $WEEKLY/cases_registered.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/error_log.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/mds_diagnoses.pl >> $CRON_LOG 2>&1
@weekly $MULTI/national_code_unknown.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/null_nhs_number.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/overdue_for_auth.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/requests_and_reports.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/pathlinks.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/unreported.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/outreach_clinic_return.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/awaiting_final_diagnosis.pl >> $CRON_LOG 2>&1

@monthly $MONTHLY/myelomaX_data.pl >> $CRON_LOG 2>&1
@monthly $MONTHLY/outreach_patients.pl >> $CRON_LOG 2>&1
@monthly $MONTHLY/register_and_error_log.pl >> $CRON_LOG 2>&1
@monthly $MULTI/national_code_unknown.pl >> $CRON_LOG 2>&1
@monthly $MONTHLY/myeloid_diagnoses.pl >> $CRON_LOG 2>&1
@monthly $MONTHLY/gallium_pending.pl >> $CRON_LOG 2>&1
@monthly $MONTHLY/gallium_data.pl >> $CRON_LOG 2>&1
@monthly $MONTHLY/request_followup.pl >> $CRON_LOG 2>&1

0 0 1 1,4,7,10 * $QUARTERLY/trial_cases.pl >> $CRON_LOG 2>&1

@yearly $YEARLY/register_and_error_log.pl >> $CRON_LOG 2>&1
0 6 * * * $DAILY/potential_trial_cases.pl >> $CRON_LOG 2>&1
0 2 * * * $DAILY/grep_cron_log.pl >> $CRON_LOG 2>&1
0 0 1 1,4,7,10 * $QUARTERLY/ncg_pnh.pl >> $CRON_LOG 2>&1
1 0 2 * * $MONTHLY/activity_data.pl >> $CRON_LOG 2>&1
0 0-1,6-23 * * * $MULTI/mysql_backup.sh incremental >> /home/raj/crons/mysql_backup.log 2>&1
0 3 * * * $MULTI/mysql_backup.sh full >> /home/raj/crons/mysql_backup.log 2>&1
0 0 28 * * $MONTHLY/nycris.pl >> $CRON_LOG 2>&1
0 0 * * 3 $WEEKLY/teaching_cases.pl >> $CRON_LOG 2>&1
0 1 * * 0-5 $DAILY/missing_request_forms.pl >> $CRON_LOG 2>&1
# 0 4 * * * perl /home/raj/awstats/wwwroot/cgi-bin/awstats.pl -config=hmds -update #AWStats update


0 5 * * * $DAILY/ecsg_mysql_archive.sh 2>&1
# @hourly CENTRE=uclh /home/raj/scripts/env.pl 'leeds' 2>&1
# @hourly /home/raj/scripts/env.pl 'leeds' 2>&1
0 0 * * 5 $WEEKLY/ngs_myeloid_screening.pl >> $CRON_LOG 2>&1
@daily $DAILY/b-lpd-non-gc.pl >> $CRON_LOG 2>&1
@daily /home/raj/apps/querylog_rotate.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/arctic_admire.pl >> $CRON_LOG 2>&1
@weekly $WEEKLY/cytogenetics_failed.pl >> $CRON_LOG 2>&1
@daily CENTRE=uclh $DAILY/diagnosis_status_alerts.pl >> $CRON_LOG 2>&1
@daily CENTRE=uclh $DAILY/mail_reports.pl >> $CRON_LOG 2>&1
@daily CENTRE=uclh $DAILY/status_complete.pl >> $CRON_LOG 2>&1
@monthly CENTRE=uclh $MONTHLY/lab_test_audit.pl >> $CRON_LOG 2>&1
@hourly /usr/local/awstats/awstats.pl -config=hmds -update >/dev/null
@daily  /usr/local/awstats/awstats.pl -config=mail -update >/dev/null
@weekly mutt -s "New dictionary terms" ra.jones@hmds.org.uk < /home/raj/apps/HILIS4/static/speller/dicts/.aspell.leeds.temp

# as root:
0 6 * * 0 cd /home/raj/apps/HILIS4 && /etc/init.d/restart-lims >> /home/raj/crons/restart.log 2>&1   #restart LIMS fastcgi processes @ 6am Sunday
