<p>This is an howto create a Bibliographic Task suitable to be used with bibsched.</p>
<h2>A BibTask</h2>
<p>For starting developing a new bibtask first take a look at the source code of bibtaskex.py.</p>
<p>A BibTask "foobar" is well done when:
<ul>
<li>it calls in its main function <tt>bibsched.task_init</tt> with the proper parameters</li>
<li>it has an associated WebAccess action called "runfoobar"</li>
<li>it has an executable installed under bin directory called "foobar"</li>
<li><tt>bibtask_config.py</tt> is updated so that <tt>CFG_BIBTASK_VALID_TASKS</tt> contains "foobar"</li>
</ul>
</p>
<h3>Available API</h3>
<p>Being a bibtask, your script should use <tt>bibtask.write_message</tt> each time it needs to inform the user about something.</p>
<p>It should use <tt>bibtask.task_set_option</tt> and <tt>bibtask.task_get_option</tt> in order to interact with the bibtask options (e.g. verbosity, runtime, sleeptime, priority...)</p>
<p>It should use <tt>bibtask.task_set_task_param</tt> and <tt>bibtask.task_get_task_param</tt> in order to interact with its specific command line options.</p>
<p>It should use <tt>bibtask.task_update_progress</tt> in order to update the progress information on the task that will be displayed in bibsched.</p>
<p>It should call <tt>bibtask.task_sleep_now_if_required</tt> in each part of the code where it's safe to sleep or stop, e.g. outside of atomic operations or transactions. If not sure, just not use this function and the task won't ever be stopped or put to sleep.</p>
<p>It should implement a function to be passed to <tt>task_init</tt> via the <tt>task_submit_elaborate_specific_parameter_fnc</tt> parameter to handle specific command line parameters of the foobar bibtask.</p>
<p>It should implement a function to be passed to <tt>task_init</tt> via the <tt>task_submit_check_options_fnc</tt> parameter to have a chance to check the correctness of command line options before the task is submitted to the queue or executed.</p>
<p>It should implement a main function to be passed to <tt>task_init</tt> via the <tt>task_run_fnc</tt> parameter as the core of the bibtask.</p>