Background Tasks

Much of the power in WTH lies not in user-triggered actions, but in tasks that run on a scheduled basis on a separate server designated for tasks.

All tasks listed as "hourly" get added to the queue at the top of the hour, and typically process within the first 15 minutes of the hour.

Tasks that run for each study

CategoryTask NameDescriptionFrequencyNotes
Data collectionupdate-apis

Download device data (e.g. GlowCap readings, weights from Nokia, etc.) from manufacturer APIs. This data goes initially into a table called connector_event_infos which is not visible to users.

Hourly 
sync-csvCopy CSV files from the web server (where they are uploaded) to the tasks server (where they are processed)Every 10 minutesCSV files are a text-formatted Excel file used to upload data into Way to Health where a device integration doesn't (yet) exist
nansenAlternative task for downloading device data. Currently only used in CMMI.Hourly 
Data processingprocess-data
  • Process downloaded device data (and CSV files), placing the results into "Manage Data"
  • Link device data to encounters
  • Close device encounters that have ended without data attaching
Hourly 
apply-feedbackSend feedback built on encounters that have just been closedUpon successful completion of the process-data task 
Messagingcreate-alert-notificationsCreates outbound notifications for Alert and Report encountersUpon successful completion of the apply-feedback task
send-voice-messagesWhen a notification is sent for a participant, it looks at notification preferences. Emails are sent immediately; voice messages and text messages are queued and sent out by these tasks.Every 5 minutes 
send-text-messagesEvery 5 minutes 
create-medication-remindersFor studies that use the "Medication Reminders" feature, sends the medication reminders immediately (without queueing) via text/voice/emailEvery 10 minutesIf the task runs at 10:33, all participants whose reminder time is between 10:30 and 10:39 will receive a reminder.
ReportingreportsCreate CSV reportsDaily at 1am 
sync-reportsCopy CSV reports to the web server, where they can be downloaded by study staff from the "Reports" tabUpon successful completion of the reports task 
Miscget-broadcastsPull platform wide broadcasts from the AlmanackEvery 5 minutesNo longer relevant
process-jobs

Runs miscellaneous user-triggered jobs, e.g.

  • Export data (triggered from Manage Data)
  • Update participant schedules (triggered by changes to the arm's encounter schedule)
Every 10 minutes 
Paymentscreate-payment-xmlCreate a payment file to send to Wells FargoDaily, between midnight and 1am 

wf-process-acknowledgment

Process Wells Fargo's acknowledgement file, marking payments as "processed" within Way to Health and sending a notification to the user letting them know that the payment is on its wayDaily, between 8am and 9am 

 

Tasks that run for the platform in general

AreaTask NameDescriptionFrequencyNotes
Data analysissync-exports Every 10 minutes 
update-big-irons Every 10 minutes 
deid Daily at 5am 
Payments

send-paymentmanager-files.php

 Daily at 1:00 am 

send-stagecoach-files.php

 Daily at 1:01 am 

get-acknowledgment-files.php

 Hourly 
Misc

cronjobs/backup.php

Code backupsDaily at 3:00 am 

cronjobs/process-log.php

 Every 10 minutes 

cronjobs/cleanup-old-logs.sh

Cleanup old log tables by deleting entries older than 2 weeks

Daily at midnight 

cronjobs/inactive-study-tasks.sh

 HourlyFormer user (Deleted)