Echo

Often when scheduling a command, it does not always run as expected, typically due to differences in execution environments. To address this problem, BeyondCron can echo the execution environment of a job.

When a jobs email, host or url are within the example.com domain, the jobs execution environment will be reported, rather than the job being being executed.

Configuration/Property variables

The length of time that an echo job runs, and its chance of success, can be configured at the server level using configuration variables, at the group level using property variables, or within a specific job using job property variables.

echo.run time that an echo job will run. If 0 seconds, then the values echo.run.min & echo.run.max will be used to define a random run time. Default = 0 seconds
echo.run.min minimum time that an echo job will run. Default = 2 seconds
echo.run.max maximum time that an echo job will run. Default = 5 seconds
echo.success percentage chance that the echo job will complete successfully. Default = 80%

the maximum value for echo.run, echo.run.min & echo.run.max is 10 minutes.

Examples

Make the default success rate for echo jobs to be 100%

jsmith% config set echo.success 100%

Set the default success rate for jobs within /examples/echo to be 75%

jsmith% property set /examples/echo echo.success 75%

Set the run time for a job to 1 second

jsmith% job property set /examples/echo/constant-runtime variable echo.run 1 second

Set the run time for a job to be a random time between 3 seconds and 2 minutes

jsmith% job property set /examples/echo/random-runtime variable echo.run.min 3 seconds
jsmith% job property set /examples/echo/random-runtime variable echo.run.max 2 minutes

Run an echo job

jsmith% job start /examples/echo/webhook
jsmith% job output $$

Request ------- GET http://example.com/echo?yesterday=Wednesday   Header ------ accept: */* accept-charset: UTF-8 connection: keep-alive content-type: application/x-www-form-urlencoded; charset=UTF-8 day: Wednesday host: localhost:8080 user-agent: App/5.241106.0-f Java/11.0.25   Content -------

See also