(schedule: DbSchedule)
| 83 | } |
| 84 | |
| 85 | export function scheduleMention(schedule: DbSchedule) { |
| 86 | let humanReadableSchedule = cronstrue.toString(schedule.cron); |
| 87 | humanReadableSchedule = humanReadableSchedule.charAt(0).toLowerCase() + humanReadableSchedule.slice(1); |
| 88 | return `will ${schedule.command} ${humanReadableSchedule} (${schedule.timezone})${schedule.reason ? ` - ${schedule.reason}` : ""}`; |
| 89 | } |
| 90 | |
| 91 | export function timeMention(seconds: number) { |
| 92 | seconds = Number(seconds); |