.. _section3.2.1: 3.2.1 - Add Check ================================= .. _AC: Action Option -**AC** (-**AddCheck**) : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ adds a check record so that a command runs later, driven by the dscheck daemon (or by an explicit :ref:`-PC ` invocation). | **dscheck** -(AC|AddCheck) [:ref:`Mode Option `] | :ref:`-(CM|Command) ` CommandNames | [:ref:`-(AV|ArgumentVector) ` ArgumentVectorString] | [:ref:`-(SN|Specialist) ` SpecialistNames] | [:ref:`-(HN|HostName) ` HostNames] | [:ref:`-(DS|Dataset) ` DatasetIDs] | [:ref:`-(AN|ActionName) ` ActionNames] | [:ref:`-(PI|ParentIndex) ` ParentCheckIndex] | [:ref:`-(PQ|PBSQueue) ` PBSBatchQueue] | [:ref:`-(WD|WorkDir) ` WorkingDirectory] | [:ref:`-(MC|MaxCount) ` MaxTryCount] | [:ref:`-(MO|Modules) ` ModuleList] | [:ref:`-(EV|Environments) ` EnvironmentPairList] | [:ref:`-(QS|QsubOptions) ` PBSBatchOptions] | [:ref:`-(OF|OutputFile) ` OutputFileName] | [:ref:`-(DB|Debug) ` DebugModeInfo] Available mode option: .. list-table:: :widths: auto :header-rows: 0 * - :ref:`-(AW|AnyWhere) ` - leave the working directory empty in the check record so the command may run from any location. Defaults: .. list-table:: :widths: auto :header-rows: 0 * - Owner - the specialist running **dscheck**. * - Working directory - the current directory at the time of :ref:`-AC `. * - Host - none specified; daemon control governs placement. Use :ref:`-PI ` (-ParentIndex) to make the new check wait for an existing parent check to finish before it can run. Use :ref:`-QS ` to pass options through to qsub when the command will run as a PBS batch job. Limitations: * Shell redirections and pipes (>, >>, |, <) are not supported in the deferred command line. Wrap such commands in a shell script and add the script. Examples: .. list-table:: :widths: auto :header-rows: 1 List files containing 'test' in the current directory, capture stdout to a log, and also display it on screen: | **dscheck** :ref:`-AC ` -CM test1.sh :ref:`-HN ` PBS <> (ls -l | grep test) | tee test1.out List files containing 'test', capturing stdout and stderr to separate log files: .. list-table:: :widths: auto :header-rows: 1 dscheck :ref:`-AC ` -CM test2.sh :ref:`-HN ` PBS <> (ls -l | grep test) 1> test2.out 2>test2.err Add the executable 'test3' for deferred execution on PBS: .. list-table:: :widths: auto :header-rows: 1 dscheck :ref:`-AC ` -CM test3 :ref:`-HN ` PBS The command 'test3' must be executable from the working directory on the PBS machine. | :ref:`Back to Top ` | :ref:`Back to Table of Contents `