gjcarneiro / yacron

A modern Cron replacement that is Docker-friendly
MIT License
449 stars 38 forks source link

Allow start without jobs #19

Closed RNACode closed 6 years ago

RNACode commented 6 years ago

Description

It would be great if jobs was non require parameter. I use docker and have following structure of configurations:

/etc/yacron.d/ base.yml dev.yml

base.yml - contains all default tasks. This file store in repository, and used in production. dev.yml - local file, which is specific for each developer. After project installation dev.yml is empty by default, but yacron breaks without jobs section.

What I Did

ERROR:yacron:Configuration error: when expecting a mapping found a blank string in "/etc/yacron.d/dev.yml", line 1, column 1:

gjcarneiro commented 6 years ago

There is an issue (crdoconnor/strictyaml#33) with a library yacron uses preventing an empty config file from working. But at least you'll be able to specify just a minimal defaults section and no jobs.