With #cron or #systemd timers, how can I run something every 2 minutes, except between 23:50 and 00:10?

I don't think there's a way to specify this, right? I can see having to write wrapper scripts to check the time and exit early.

#linux #unix #sysAdmin

@artfulrobot
if i'm not mistaken you can do something like this:
# run every 2 minutes from 1 to 22:59
*/2 1-22 * * * foo
# run every 2 minutes between 23:00 and 23:50
0-50/2 23 * * * foo
# run every 2 minutes between 0:10 and 0:59
10-59/2 0 * * * foo

not exactly the prettiest but it should do the trick (i hope).