Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function nextScheduled(appId: string, cronExpression: string): ScheduledSnapshot {
const cron = new Cron();
return {
appId,
id: randomstring.generate({ capitalization: "lowercase" }),
scheduledTimestamp: cron.fromString(cronExpression).schedule().next(),
};
}