Configuring study schedule

Hi @m.hashemian,

I am looking for a way to repeat the study throughout the week (not during the weekends) for 3 weeks long, starting from, let’s say, 1 Dec.
I figured that week_days = 3 means that it repeats the pattern every three weeks, but not for three weeks long. Is there another argument that I can use for this option?

Best,
Teun

Hey @t.siebers

I moved the post to a new topic as it seems to be separate from the previous question.

I’m not sure if I understand you correctly. You are creating a study where each participant is expected to be part of it for 3 weeks (hence Participation Period is 3 weeks, more here), but you want to skip weekends. Correct?

In this case, you can just make sure you configure your surveys of that study such that they are not prompted to the participants during the weekend. correct?

Hi @m.hashemian,

That is indeed how we would like to have it. However, we cannot align the survey period with the study period because we have a baseline survey in the study as well, and that one will take place earlier (i.e., one week before 1 Dec.)…

-Teun

Let’s assume you plan to start the enrolment on Nov. 11th (this Monday), continue enrolling until Nov. 30th, and then start the surveys for all enrolled participants from Dec. 1st to Dec. 21st, and finish the study on Dec. 22nd. Here is how you could do it:

  1. Create a study, set the start time to now, and end time to Dec. 22nd, and set the participation period to be the same as study period. This way, when a participant joins, their participation period will be from the time they joined until Dec. 22nd.
  2. Create your surveys, set their first trigger to Dec. 1st 2019, and a repeating schedule as needed. Note that the first trigger time of the survey in this case will not be relative to the participant’s registration time, but it will be a fixed date & time, as we discussed in the other topic.
  3. Test to make sure the schedules are correct.

Everything should work now. Thanks for your help!

1 Like

Hey @m.hashemian,

I created a test study with the time triggering scheme that we would like to have in our real ESM study. The members in our research team have signed up for the study as participant, and here we realized that something is wrong with the repetition of the time triggers. We intended to have 6 triggers per day, every day starting with a ‘morning survey’ (test survey ID = 4801), which is substituted by a ‘weekend morning survey’ in the weekends (test survey ID = 4802), followed by another 4 surveys throughout the day (test survey ID = 4800), and finally an ‘evening survey’ (test survey ID = 4799). The study registration code is 931.

Unfortunately, there is one day missing “2019-11-19” and from then, the time trigger scheme becomes a mess :frowning_face: So, my hunch is that the first days are set up properly, but that the repetition is incorrect.

To give you an example of our JSON code, here is how we established the morning survey time trigger:

"triggering_logics": [
    {
        "id": 0,
        "type": "time",
        "schedule": {
            "time_format": "relative",
            "base": "registration_date",
            "period": {
                "start": "2019-11-13 07:00:00",
                "end": "2019-11-13 07:30:00",
                "randomization": {
                    "function": "uniform"
                }
            },
            "repeat": {
                "occurrence_unit": "week",
                "occur_every": 1,
                "week_days": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri"
                ]
            },
            "end": {
                "criteria": "on_count",
                "last_count": 14
            }
        },
        "criteria": "",
        "notifications": []
    }
],

The idea is that we would like this survey to occur every morning on weekdays (mo - fri) for 3 weeks (1 trigger and repetition is set to 14). However, when inspecting ‘survey sessions’, there is no trigger on Friday the 22nd, which I think is weird.

Could you let me know what is wrong in the JSON code above?

Best,
Teun

Hi @t.siebers

I have not checked the details of the schedule you described, but I will describe one behaviour of the system which might explain this. When you create multiple triggering logics for your survey, each of them with a repetition pattern, Ethica does not create all the sessions for all the triggering logics up front. That would be very hard to handle. Instead, it will create the first 50 sessions for each of those triggering logics, and then as the time goes on, it periodically checks if it has to create more sessions for each of those triggering logics.

So if you have one triggering logic for your survey that prompts the survey once a day, you will notice Survey Sessions shows the sessions for the next 50 days (or less, if the participation is supposed to finish before 50 days), but if the triggering logic is set to repeat twice a day, you will notice only sessions for the next 25 days are created, or if the TL repetition pattern is four times a day, Ethica will only schedule prompts for the next 12 days, and so on.

I think this might explain why you see that there are sessions created properly for the first couple of weeks, but after that only a subset of them are created. If you think this does not explain the behaviour you see in the dashboard, let me know.

Thank you

Hi @m.hashemian,

Thanks for your reply. If your suggestion would be true, we would expect to see the triggering schedule for the first couple of days, and then it should stop after a certain moment (i.e., after the 50 repetitions). The remarkable thing is that it indeed stops, but after that, it starts again. As depicted below, you can see that it has 3 triggers on the 26th and 8 on the 27th.

The pattern that we intend to establish consists of 6 triggers (from 3 surveys) every day:

  • the first one from 4801 (in the weekends this is 4802)
  • then four from 4800
  • then the final one from 4799

In the picture below, you can see that it does work properly for the first couple of days:

So, I am not sure whether this problem could be attributed to the fact that it displays only a limited sample of all triggers. Could there be anything else that is spoiling our schedule?

Best,
Teun

Thanks for the detailed explanation @t.siebers. I’ve passed this to my colleague to check. I will follow up with you as soon as I hear back. It might take a bit time though, likely by early next week.

Thank you

1 Like

Hey @m.hashemian,

To solve the problem, I have created more time triggers (i.e., every week new ones) with less repetitions. This seems to work (yay! :smiley: ). Even though I still don’t know what was wrong with the code that I showed above, the solution is already there so the explanation is not needed anymore, at least, not to us.

Thanks anyway!

Hi @t.siebers

Thanks for the explanation. We actually looked into this in more detail this morning and couldn’t find any issues with the logic. That being said, last week we fixed an issue related to generating survey prompts with absolute time. I suspect the sessions you showed above was generated prior to our fix, and if you would have regenerated sessions by pressing Reload Studies from the Server in the app, the proper prompt times would be shown.

As now things are working, you may decide not to change them any further. But if you do change them back things should work as expected as well.

Thank you,
Mohammad

1 Like

Hi @m.hashemian,
I checked it by uploading the old script (the one above) and now it works!

Thanks a lot :smiley:

1 Like