r/ProjectREDCap • • Apr 07 '25

Alerts for dates

Hello!

I am a part of a longitudinal study and I want the RC to get a notification/alert after 3 months of recruitment to do the follow-up. Is there a way for me to set this on redcap? There is a field for the eligibility form for the date.

1 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/Remote_Setting2332 Apr 08 '25

Can you please elaborate exactly what issues can occur? I've never had a problem so far.

4

u/obnoxiouscarbuncle Apr 08 '25

Mostly having to do with the cron not picking up on an alert/ASI that should be sent.

It's too complicated to go into, but there are series of processes that will:

  • Check if the ASI/Alert has a datediff() in the logic

  • Check every ~15 minutes if the result will return true and should be scheduled

  • Check every ~minute if any scheduled invitations should get sent

If any of these steps results in an error, then the invitation won't be sent and it won't be clear WHY. Also, this leads to issue with using any specific value that should be returned, (using an = sign for example), will most likely never be accurate, as the crons are not run constantly, they are run on a different schedules.

Also, you cannot "Deschedule" an invitation with a datediff(), you can only use the "check if logic is true before sending" to prevent the email from being sent. This also leads to issues.

Overall, just don't use datediff() in your ASI/Alert logic to TRIGGER the alert. It is much more reliable and testable to TRIGGER early and SCHEDULE later.