Schedule things for “next Friday” automatically

Imagine you’ve got a new user who just signed up on a Tuesday. You want to check in with them on Friday to see how their first week went.

In most systems, there would be no way to do this, or, if there were, you’d have to calculate: “Today is the 15th, so Friday would be the 18th, which is 3 days from now…”

And if they sign up on Saturday? Now you need different logic. What if it’s already Friday afternoon?

There’s a simpler way: just tell GuidedTrack “schedule this for Friday” and let it figure out the dates.

Schedule based on weekdays, not dates

GuidedTrack lets you create dates based on specific weekdays:

>> fridayThisWeek = calendar::date({"weekday" -> "Friday"})

This finds the Friday of the current week. Simple enough. You can now use this like any other date, like for example feeding it into an email’s *when keyword to schedule an email to be delivered on Friday.

When to use weekday-based scheduling

This approach works great for:

  • Onboarding sequences where you want check-ins on specific days of the week
  • Weekly programs that should always start on Mondays (or any day)
  • Habit trackers that align with people’s weekly routines
  • Study schedules with sessions on specific weekdays
  • Team coordination where everyone gets reminders on the same days

The catch: “Friday this week” might be in the past

If someone signs up on Saturday, “Friday this week” already happened. You need to make sure you’re scheduling for an upcoming Friday:

>> fridayThisWeek = calendar::date({"weekday" -> "Friday"})

*if: fridayThisWeek < calendar::date
	>> upcomingFriday = fridayThisWeek + 7.days
*if: fridayThisWeek >= calendar::date
	>> upcomingFriday = fridayThisWeek

Now upcomingFriday is always a date in the future, no matter what day someone signs up.

One important quirk: weeks start on Sunday

Computer weeks start on Sunday, not Monday. This means:

  • “Sunday this week” is either today (if it’s Sunday) or already passed
  • If you want “the upcoming Sunday,” you almost always need to add 7 days when running the check on Sunday itself

This is just how date systems work. It’s a bit quirky, but once you know it, you can plan around it.

Getting started

Here is the basic pattern:

>> targetDay = calendar::date({"weekday" -> "DayName"})

*if: targetDay < calendar::date
	>> upcomingDate = targetDay + 7.days
*if: targetDay >= calendar::date
	>> upcomingDate = targetDay

Replace "DayName" with Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday.

The code is simpler. The logic is clearer. And it just works.