From c6d2e0758b83c611a90fe81dcf2a007f91a02c78 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:08:15 -0500 Subject: [PATCH 01/13] Add info on rocotorc file --- docs/source/start.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/source/start.rst b/docs/source/start.rst index 98c15279a7..3709feb59c 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -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 + +.. NOTICE:: + 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//rocotorc``. Here is a sample working version of this file: + + ``` + --- + :DatabaseType: SQLite3 + :BatchQueueServer: false + :WorkflowDocType: XML + :DatabaseServer: true + :BatchQueueServer: true + :WorkflowIOServer: true + :MaxUnknowns: 3 + :MaxLogDays: 7 + :AutoVacuum: true + :VacuumPurgeDays: 30 + :SubmitThreads: 8 + :JobQueueTimeout: 45 + :JobAcctTimeout: 45 + ``` From dfb2c44acac86407ff39c92b00c0f22291b6fb52 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:09:07 -0500 Subject: [PATCH 02/13] Update paths for rocotorc file doc --- workflow/rocoto/workflow_xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/workflow_xml.py b/workflow/rocoto/workflow_xml.py index 281e250626..18bb15f335 100644 --- a/workflow/rocoto/workflow_xml.py +++ b/workflow/rocoto/workflow_xml.py @@ -245,7 +245,7 @@ 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" ) with open(rocotorc_file) as rc_f: @@ -253,5 +253,5 @@ def _check_rocotorc(self): 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" ) From 1c92253b94d6bc01132a17c2b836526c85ce9ae4 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:18:03 -0500 Subject: [PATCH 03/13] Change NOTICE to note --- docs/source/start.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index 3709feb59c..2078078130 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -62,7 +62,7 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb */5 * * * * /path/to/rocoto/launch/script -.. NOTICE:: +.. 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//rocotorc``. Here is a sample working version of this file: From af85654a921d8c411c26fd6cef08497ac6bfa717 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:20:18 -0500 Subject: [PATCH 04/13] Escape colons --- docs/source/start.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index 2078078130..bad2e6dc35 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -69,17 +69,17 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb ``` --- - :DatabaseType: SQLite3 - :BatchQueueServer: false - :WorkflowDocType: XML - :DatabaseServer: true - :BatchQueueServer: true - :WorkflowIOServer: true - :MaxUnknowns: 3 - :MaxLogDays: 7 - :AutoVacuum: true - :VacuumPurgeDays: 30 - :SubmitThreads: 8 - :JobQueueTimeout: 45 - :JobAcctTimeout: 45 + \:DatabaseType: SQLite3 + \:BatchQueueServer: false + \:WorkflowDocType: XML + \:DatabaseServer: true + \:BatchQueueServer: true + \:WorkflowIOServer: true + \:MaxUnknowns: 3 + \:MaxLogDays: 7 + \:AutoVacuum: true + \:VacuumPurgeDays: 30 + \:SubmitThreads: 8 + \:JobQueueTimeout: 45 + \:JobAcctTimeout: 45 ``` From 3d404637a6304b24b8d5aff406815d7496892a66 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:24:45 -0500 Subject: [PATCH 05/13] Create a code block instead --- docs/source/start.rst | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index bad2e6dc35..b14a548ca0 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -67,19 +67,18 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb The file is located here: ``~/.rocoto//rocotorc``. Here is a sample working version of this file: - ``` - --- - \:DatabaseType: SQLite3 - \:BatchQueueServer: false - \:WorkflowDocType: XML - \:DatabaseServer: true - \:BatchQueueServer: true - \:WorkflowIOServer: true - \:MaxUnknowns: 3 - \:MaxLogDays: 7 - \:AutoVacuum: true - \:VacuumPurgeDays: 30 - \:SubmitThreads: 8 - \:JobQueueTimeout: 45 - \:JobAcctTimeout: 45 - ``` + .. code:: + --- + :DatabaseType: SQLite3 + :BatchQueueServer: false + :WorkflowDocType: XML + :DatabaseServer: true + :BatchQueueServer: true + :WorkflowIOServer: true + :MaxUnknowns: 3 + :MaxLogDays: 7 + :AutoVacuum: true + :VacuumPurgeDays: 30 + :SubmitThreads: 8 + :JobQueueTimeout: 45 + :JobAcctTimeout: 45 From 2160835dc5e5ce493108e889e44253cb9a50414e Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:26:38 -0500 Subject: [PATCH 06/13] Escape dashes --- docs/source/start.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index b14a548ca0..94e47bee4e 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -68,7 +68,7 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb The file is located here: ``~/.rocoto//rocotorc``. Here is a sample working version of this file: .. code:: - --- + \--- :DatabaseType: SQLite3 :BatchQueueServer: false :WorkflowDocType: XML From a8dd17ae849211703f3d20865237b2b6f598e981 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:27:54 -0500 Subject: [PATCH 07/13] Escape dashes --- docs/source/start.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index 94e47bee4e..258fe9a3bf 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -67,18 +67,18 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb The file is located here: ``~/.rocoto//rocotorc``. Here is a sample working version of this file: - .. code:: - \--- - :DatabaseType: SQLite3 - :BatchQueueServer: false - :WorkflowDocType: XML - :DatabaseServer: true - :BatchQueueServer: true - :WorkflowIOServer: true - :MaxUnknowns: 3 - :MaxLogDays: 7 - :AutoVacuum: true - :VacuumPurgeDays: 30 - :SubmitThreads: 8 - :JobQueueTimeout: 45 - :JobAcctTimeout: 45 +.. code:: + --- + :DatabaseType: SQLite3 + :BatchQueueServer: false + :WorkflowDocType: XML + :DatabaseServer: true + :BatchQueueServer: true + :WorkflowIOServer: true + :MaxUnknowns: 3 + :MaxLogDays: 7 + :AutoVacuum: true + :VacuumPurgeDays: 30 + :SubmitThreads: 8 + :JobQueueTimeout: 45 + :JobAcctTimeout: 45 From 4a4bffed327593060fd64470f43262cce422332f Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:30:49 -0500 Subject: [PATCH 08/13] Try removing the dashesw --- docs/source/start.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index 258fe9a3bf..fe1012ef88 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -68,7 +68,7 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb The file is located here: ``~/.rocoto//rocotorc``. Here is a sample working version of this file: .. code:: - --- + :DatabaseType: SQLite3 :BatchQueueServer: false :WorkflowDocType: XML From 042786c7645106d10df319fc4a5d80a577a88189 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:32:40 -0500 Subject: [PATCH 09/13] Add dashes back, try ticks --- docs/source/start.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/start.rst b/docs/source/start.rst index fe1012ef88..ddaa73f450 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -69,6 +69,7 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb .. code:: + `---` :DatabaseType: SQLite3 :BatchQueueServer: false :WorkflowDocType: XML From bb66a69e156cf46caa3b5ac50ac89fe9129bf682 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 13:38:50 -0500 Subject: [PATCH 10/13] Try triple quotes --- docs/source/start.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index ddaa73f450..456b03190a 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -69,7 +69,8 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb .. code:: - `---` + """ + --- :DatabaseType: SQLite3 :BatchQueueServer: false :WorkflowDocType: XML @@ -83,3 +84,4 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb :SubmitThreads: 8 :JobQueueTimeout: 45 :JobAcctTimeout: 45 + """ From a97968c0ad230c099d49a25bf6393e460e500f03 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:00:59 -0500 Subject: [PATCH 11/13] Update docs/source/start.rst Co-authored-by: Eric Sinsky - NOAA <48259628+EricSinsky-NOAA@users.noreply.github.com> --- docs/source/start.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index 456b03190a..d01bfe3b95 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -75,7 +75,6 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb :BatchQueueServer: false :WorkflowDocType: XML :DatabaseServer: true - :BatchQueueServer: true :WorkflowIOServer: true :MaxUnknowns: 3 :MaxLogDays: 7 From abe503f6c431ae34f6d821c8e53ca6d372e6c3d7 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 14:12:40 -0500 Subject: [PATCH 12/13] Start with a comment --- docs/source/start.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/start.rst b/docs/source/start.rst index d01bfe3b95..c9b615681c 100644 --- a/docs/source/start.rst +++ b/docs/source/start.rst @@ -69,7 +69,7 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb .. code:: - """ + # This "---" is the required first line of the file --- :DatabaseType: SQLite3 :BatchQueueServer: false @@ -83,4 +83,3 @@ Scrontab instead launches a script and requires SCRON directives to launch an sb :SubmitThreads: 8 :JobQueueTimeout: 45 :JobAcctTimeout: 45 - """ From 0ead2594e9006f9e6276cd17a5066cedb18a19b4 Mon Sep 17 00:00:00 2001 From: David Huber Date: Wed, 5 Mar 2025 14:28:52 -0500 Subject: [PATCH 13/13] Make the HTML path more precise --- workflow/rocoto/workflow_xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rocoto/workflow_xml.py b/workflow/rocoto/workflow_xml.py index 18bb15f335..ee9ad90764 100644 --- a/workflow/rocoto/workflow_xml.py +++ b/workflow/rocoto/workflow_xml.py @@ -245,7 +245,7 @@ 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/start.html" + "https://global-workflow.readthedocs.io/en/latest/start.html#set-up-your-experiment-cron-or-scron" ) with open(rocotorc_file) as rc_f: @@ -253,5 +253,5 @@ def _check_rocotorc(self): 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/start.html" + "https://global-workflow.readthedocs.io/en/latest/start.html#set-up-your-experiment-cron-or-scron" )