Page tree
For cPanel & WHM version 82.


Skip to end of metadata
Go to start of metadata

Overview

The /usr/local/cpanel/scripts/try-later script runs a check command at a specified interval. If the check command returns an error, the script will retry that check command a specified number of times. When the check command succeeds, the script will run the action command. If the check command fails the maximum number of retries, the script will perform an act-finally command.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/try-later --action COMMAND --max-retries NUMBEROFMINUTES --delay NUMBEROFMINUTES --check COMMAND  -at --act-finally COMMAND

Options

Use the following options with this script:

OptionsDescriptionExample
--check COMMANDThe script runs this command to determine whether to perform the action command.
/usr/local/cpanel/scripts/try-later --check COMMAND
--at

The script will run the check command at the specified time.

For more information, read the at manual page.

/usr/local/cpanel/scripts/try-later --at 1620 apr 20
--delay

The script will pause for this number of minutes before it performs each check and action command.

Note:

This option overrides the --at option.

/usr/local/cpanel/scripts/try-later --delay 5
--max-retriesThe script will attempt to run the check command this number of times.
/usr/local/cpanel/scripts/try-later --max-retries 3
--skip-checkThe script will skip the first check command.
/usr/local/cpanel/scripts/try-later --skip-check
--action COMMANDWhen the check command succeeds, the script will run the action command.
/usr/local/cpanel/scripts/try-later --action COMMAND
--act-finally COMMANDIf the check command fails the maximum number of retries, the script performs this command.
/usr/local/cpanel/scripts/try-later --act-finally COMMAND
--has-jobsThe script will indicate whether its queue is empty or not.
/usr/local/cpanel/scripts/try-later --has-jobs

Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels