You can run agents from the command line using the RunAgent.exe program, which can be found in the Sequentum Enterprise installation folder.
With the release of Sequentum Enterprise Software version 2.73.0 the Sequentum Enterprise installation folder will be changed to C:\Program Files\Sequentum\Sequentum EnterpriseThe old software installation folder location was C:\Program Files\Sequentum\Content Grabber 2
You can specify the full path to an agent file or just the name of the agent. If you only specify the agent name, Sequentum Enterprise will look for the agent in the default location for the user running the program. If the agent is not located in that folder, Sequentum Enterprise will look in the default public agent location. The default public agent location is:
C:\Users\Public\Documents\Content Grabber 2\Agents
If your agent is not located in any of the default agent locations, you need to specify the full path to the agent file:
RunAgent.exe "C:\My Custom Folder\agentName.scg"
When running multiple agents in a batch file, you can use the Start command to run the agents asynchronously:
Start "WindowTitle" RunAgent.exe agentName1
Start "WindowTitle" RunAgent.exe agentName2
The RunAgent.exe command line program returns one of the following exit codes:
Data extraction was completed successfully.
A critical application error occurred during data extraction.
Data extraction was interrupted.
Completed with errors
Data extraction was completed, but with one or more page load errors or missing required elements.
Incomplete with errors
Data extraction was interrupted, and encountered one or more page load errors or missing required elements.
Data extraction failed because it was unable to export data. You can manually open Sequentum Enterprise and attempt to export.
The agent contains features that are only available to agents created with a Premium Edition of Sequentum Enterprise when using the royalty-free runtime.
Agent run completed without meeting defined success criteria.
Trying to start an agent that is already running.
Invalid Data Cannot Continue
Retrying or continuing an agent that has an invalid internal data structure.
Initialization Script Failed
The agent initialization script failed.
Process Start Timeout
Timeout waiting for agent process to start.
Unknown Exception Check Log
Unknown error. Look for details in the error log.
An invalid agent command-line parameter was specified. Look for details in the error log.
Process Error Exit Before Start
The agent process exited with an error before the agent started successfully.
Agent Import Folder not Found
An agent import folder has been specified, but the folder does not exist.
Agent Import Name Empty
An agent import name has been specified, but the name is empty.
Error Creating Default Document Folders
An error occurred while trying to create default Sequentum Enterprise folders in the current users document folder. This error will only be returned from the Sequentum Enterprise Editor, never from the Sequentum Enterprise runtime.
Default Log Folder Missing
The log_to_file or log_path has been specified without a log path.
Error creation specified log path.
Server is in a paused or stopped mode and cannot run agents at this time.
Agent has been paused.
Error posting notification to ACC.
Cannot continue agent run with a mismatching agent run ID.
Command Line Arguments
Input parameters can be added as command line arguments. The input parameter name must be preceded with a dash. For example:
RunAgent.exe agentName -username "test" -password "test"
Please see the topic Input Parameters for more information.
The following command line switches can be used, and should not have a preceding dash:
Log detail level. Logging is turned off by default.
Example: RunAgent.exe agentName log_level High
Logs the HTML of all loaded web pages to files.
Example: RunAgent.exe agentName log_html
Logs information to a file instead of a database. A log path must be specified. Specify an empty string to use the default log path.
Example: RunAgent.exe agentName log_to_file ""
Displays the web browsers used to navigate the target website.
Example: RunAgent.exe agentName view_browser
No user interface will be displayed. This will cause an agent pause command to fail.
Example: RunAgent.exe agentName no_ui
The agent will run in a specified session.
Example: RunAgent.exe agentName session_id sdgfdf4353
If an agent runs in a session, this is the session timeout in minutes. The default session timeout is 30 minutes.
Example: RunAgent.exe agentName session_id sdgfdf4353 session_timeout 10
Specifies how to run an agent. One of the following values is expected.
Example: RunAgent.exe agentName run_method continue
If the specified agent is an exported agent, the agent will be imported to this folder.
If the specified agent is an exported agent, the agent will be renamed to this name. Only applicable when agent_import_folder is specified.
Use this parameter instead of log_to_file if you want to log to the database, but want to specify the log path for any errors that occur before the agent is able to log to the database. Don't specify this parameter if you have already specified log_to_file.
Use this parameter to specify the environment when running the agent. One of the following values is expected:
Example:RunAgent.exe agentName -env_ Prod