Support > Administrator's guide (R7) > Execution of external command

By specifying a job schedule, you can periodically execute external commands.

You can periodically run external commands (eg EXE file in Windows OS) from Wagby.

Figure 1 Job settings
  1. Log on with an account with administrator privileges.
  2. Open the "Job Management" "Job Schedule Search" screen from the menu.
  3. Click the "Register Screen" button to register a new job schedule.
  4. Select "ProcessExec" from the job name."External command execution" is displayed in the explanation column below that.
  5. In the job parameter, write the command you want to execute.Figure 1 specifies the next command to check the contents of the C: drive.
    cmd /C "dir C:\"
  6. Specify the schedule.
  7. Check the "valid" flag.
  8. Enter the account "jobadmin" to run this job.
  9. Register the job schedule.The command will be executed at the specified time.
The external command here is what runs on the application server.Please describe the file path according to the folder structure of the application server.

If you want to execute multiple commands, prepare a separate job schedule corresponding to one command.

The execution result of the job is described in the log file (system.log). However, if the execution result does not return any return value (character string), or if the job is not executed due to incorrect description of the external command, the execution result is not included in the log.Instead, it is recorded as follows.

[WARN jp.jasminesoft.jfc.job.JFCBaseJobBean executeInternal] No message is returned.

You can specify more than one parameter to specify for the job. The parameters that can be specified here are as follows.

Parameter name Required Description Description example
cmd Specify an external command. cmd /C "dir C:\"
dir Specify the directory to execute the external command. C:\work
env Specify the environment variable given to the external command in the format "environment variable name = value".When specifying more than one environment variable, please set the key of the parameter to env 1, env 2, env 3, ... instead of env. SAMPLE=sample
maintenance You can switch to maintenance mode before running this job.Maintenance mode also ends after job execution. true
maintenanceOption Specify how to respond to the account that was logged on when switching to maintenance mode. Logout: Force logout of the account logged on before job execution.
Fail: If there is an account logged on before job execution, cause the job to fail.
(Default): Switch the mode while leaving the logged on account unchanged.
lock Specify the model to lock before executing.After the job is finished, the lock is canceled. Model name of customer etc. English.Multiple models can be specified with a space separator.
cache After the job is completed, the cache of the specified model is cleared. Model name of customer etc. English.Multiple models can be specified with a space separator.

You can temporarily disable the job.

  1. Log on with an account with administrator privileges.
  2. Open the "Job" "Job Schedule Search" screen from the menu.
  3. Search the applicable "Job Schedule" and open the maintenance screen.
  4. Uncheck the "Enabled" flag and save it.
    Figure 2 Disable Job

You can send the job execution result by e-mail.

Multiple job execution can not be performed.

If you make a job start every minute, if execution of this job is not completed in 1 minute, a new job will not be executed.

Instead of specifying time, you can also run this job now.Please read "Job Immediate Execution".