I know that "10-12" is a valid range for the hour part of chron and that "6,7,8" is avlid syntax too.
Can I combine these 2 an us "6,10-12" if valid hours time is at 6 and between 10 and 12?
That depends on which cron daemon is in use.
Debian/Ubuntu ship with Vixie cron by default. The manual page for it (man 5 crontab
) has this to say:
Ranges of numbers are allowed. Ranges are two numbers separated
with a hyphen. The specified range is inclusive. For example,
8-11 for an ``hours'' entry specifies execution at hours 8, 9, 10
and 11.
And further...
Lists are allowed. A list is a set of numbers (or ranges)
separated by commas.
So for this particular implementation, "6,10-12
" would be valid as it is a list containing a number and a range, and a range can include lists.
If you are unsure, man 5 crontab
should provide clarity.