When you specify a timezone for your cron check as specified in the docs, the UI does not correctly display the schedule.
Expected Behavior
The check page should correctly display the cron schedule, with timezone information.
Current Behavior
For a check with the cron schedule CRON_TZ=America/Edmonton 0 10,22 * * *, the UI shows this:
Note that this problem happens with both CRON_TZ and TZ.
It looks like it's treating the / in the time zone as a cron step value.
For comparison purposes, here's what the check looks like when the schedule is 0 10,22 * * *, without the timezone:
Possible Solution
You could split the string on space characters, check if the first chunk contains TZ=, and if perform the current processing with the remaining chunks, and then split the first chunk on = and add something like in the timezone America/Edmonton to the tail end of the schedule text.
Steps to Reproduce
Define a check with a cron: schedule, including a time zone as instructed in the documentation linked above
Observe the Schedule in the dashboard for that check.
When you specify a timezone for your cron check as specified in the docs, the UI does not correctly display the schedule.
Expected Behavior
The check page should correctly display the cron schedule, with timezone information.
Current Behavior
For a check with the cron schedule
CRON_TZ=America/Edmonton 0 10,22 * * *
, the UI shows this:Note that this problem happens with both
CRON_TZ
andTZ
.It looks like it's treating the
/
in the time zone as a cron step value.For comparison purposes, here's what the check looks like when the schedule is
0 10,22 * * *
, without the timezone:Possible Solution
You could split the string on space characters, check if the first chunk contains
TZ=
, and if perform the current processing with the remaining chunks, and then split the first chunk on=
and add something likein the timezone America/Edmonton
to the tail end of the schedule text.Steps to Reproduce
cron:
schedule, including a time zone as instructed in the documentation linked aboveSchedule
in the dashboard for that check.