title: Job Scheduler - YAML for writing job definition?
body: <p>In our legacy job scheduling software (built on top of crontab), we are using apache config format (<a href="https://metacpan.org/source/TLINDEN/Config-General-2.63/General.pm#L769" rel="nofollow noreferrer">parser</a>) for writing a job definition and we are using perl config general to parse the config files. This software is highly customized and have  functionalities like running commands in my job after checking if dependency of that command is met or not, rescheduling jobs in case command fails, supporting custom notifications etc.</p>
  
  <p>We are now planning to rewrite this software in python and considering options like YAML instead of apache config to write job definition. Is YAML good for writing such dynamic configurations?</p>
  
  <p>Example of job definition (run this job at 2AM daily, check if it is tuesday and not holiday in India, if yes reserve my flight and send notification):  </p>
  
  <pre><code>// python function to check if it is tuesday
  checkIfTuesdayAndNotHoliday()
  
  &lt;job&gt; 
      calendar: indian
  
          &lt;dependency: arbitrary_python_code: checkIfTuesdayAndNotHoliday()&gt;
          &lt;command&gt;  
              check availability of flight
          &lt;/command&gt;
  
          &lt;success: notify: email: agrawall/&gt;
          &lt;failure: notify: email: ops&gt;
          &lt;command&gt;
              some command to book my flight
          &lt;/command&gt;
  &lt;/job&gt;
  
  &lt;crontab&gt; 0 2 * * * &lt;/crontab&gt;
  </code></pre>
  
  <p>I am struggling to understand what format should I use to define job (YAML, Apache Config, XML, JSON etc). Note that this job definition will be converted to job object inside my python script. </p>
  
  <p>Apache config parser in perl that we currently use <a href="https://metacpan.org/source/TLINDEN/Config-General-2.63/General.pm#L769" rel="nofollow noreferrer">https://metacpan.org/source/TLINDEN/Config-General-2.63/General.pm#L769</a></p>
  
  <p>Apache config parser in python we plan to use <a href="https://github.com/etingof/apacheconfig" rel="nofollow noreferrer">https://github.com/etingof/apacheconfig</a> </p>