diff --git a/connectors/src/connectors/confluence/temporal/client.ts b/connectors/src/connectors/confluence/temporal/client.ts index 1e2077c57ee5..a409d3e9d2f0 100644 --- a/connectors/src/connectors/confluence/temporal/client.ts +++ b/connectors/src/connectors/confluence/temporal/client.ts @@ -51,6 +51,7 @@ export async function launchConfluenceSyncWorkflow( const workflowId = makeConfluenceSyncWorkflowId(connector.id); const minute = connector.id % 60; // Spread workflows across the hour. + const oddOrEvenHour = connector.id % 120 >= 60 ? 1 : 0; // Spread workflows on even or odd hours. // When the workflow is inactive, we omit passing spaceIds as they are only used to signal modifications within a currently active full sync workflow. try { @@ -70,7 +71,7 @@ export async function launchConfluenceSyncWorkflow( memo: { connectorId, }, - cronSchedule: `${minute} * * * *`, // Every hour at minute `minute`. + cronSchedule: `${minute} ${oddOrEvenHour}/2 * * *`, // Every 2 hours at minute `minute`. }); } catch (err) { return new Err(err as Error);