0

I'm trying to set a schedule once a day at nine a clock but I want to exclude weekends. I'm using expo notifications in react native:

const scheduleDailyNotifications = async () => {
    await Notifications.cancelAllScheduledNotificationsAsync();
    await Notifications.scheduleNotificationAsync({
        content: {
            categoryIdentifier: 'scheduler',
            title: 'My title',
            body: 'My Body',
            sound: 'default',
        },
        trigger: {
            hour: 9,
            minute: 0,
            repeats: true,
        },
    });
};

With this code everything works fine, I can receive a notification every day at nine o clock, but I just want to exclude weekends. Help, please?

Erjon
  • 923
  • 2
  • 7
  • 32

0 Answers0