Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rocotorc documentation when using scrontab #3417

Merged
22 changes: 22 additions & 0 deletions docs/source/start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,25 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb
#SCRON --time=00:10:00

*/5 * * * * /path/to/rocoto/launch/script

.. note::
When running rocoto via scrontab, it is not possible to run rocoto's queue server, so this feature must be disabled. This is accomplished by editing the rocotorc file. This file is created when rocotorun is executed. If you have not run that script yet, then you may need to create it yourself.

The file is located here: ``~/.rocoto/<rocoto version>/rocotorc``. Here is a sample working version of this file:

.. code::

# This "---" is the required first line of the file
---
:DatabaseType: SQLite3
:BatchQueueServer: false
:WorkflowDocType: XML
:DatabaseServer: true
:WorkflowIOServer: true
:MaxUnknowns: 3
:MaxLogDays: 7
:AutoVacuum: true
:VacuumPurgeDays: 30
:SubmitThreads: 8
:JobQueueTimeout: 45
:JobAcctTimeout: 45
4 changes: 2 additions & 2 deletions workflow/rocoto/workflow_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ def _check_rocotorc(self):
raise FileNotFoundError(
"Could not find the rocotorc file!\n"
f"Please create '{rocotorc_file}' following the documentation at" "\n"
"https://global-workflow.readthedocs.io/en/latest/configure.html"
"https://global-workflow.readthedocs.io/en/latest/start.html#set-up-your-experiment-cron-or-scron"
)

with open(rocotorc_file) as rc_f:
if ":BatchQueueServer: false" not in rc_f.read():
raise ValueError(
f"':BatchQueueServer: false' should be written to {rocotorc_file}, but it is not!" "\n"
"Please follow the documentation guide here:\n"
"https://global-workflow.readthedocs.io/en/latest/configure.html"
"https://global-workflow.readthedocs.io/en/latest/start.html#set-up-your-experiment-cron-or-scron"
)