Switch cases with only one Cron Job?

async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext): Promise<void> {

/*
*/

const currentMinute = new Date().getMinutes();
        // cron - 0,3,6,9,12,15 0,12 * * *
        switch (currentMinute) {
            case 0:
                await manageVectorEmbeddings();
                break;
            case 3:
                await add_top_10_news();
                break;
            case 6:
                await add_business_news();
                break;
            case 9:
                await add_politics_news();
                break;
            case 12:
                await add_sports_news();
                break;
            case 15:
                await add_technology_news();
                break;
        }


Can I rely on this?
Was this page helpful?