Prerequisites for Monitoring Cron Jobs

Prerequisites for Monitoring Cron Jobs

Before configuring Cron job monitoring, ensure the following prerequisites are met:

  • cURL must be installed on the remote Linux machine.

  • The script linked to the Cron job must have executable permissions.

  • The machine where Applications Manager is installed should be reachable from the remote Linux machine over the SSL port, without using a proxy server.

  • The remote machine must have the correct time zone configured and synced.

  • The Cron job interval must be at least five minutes.

  • Cron jobs use the HTTPS protocol to send responses to the Applications Manager server and are authenticated using the admin user's REST API key. If the admin API key is regenerated, update the Cron job entry with the new key using the crontab -e command on the remote machine.

  • Linux Cron monitoring is supported only in SSH and Telnet modes.

Steps to Configure Cron Jobs

1. Verify if curl is installed

On the remote machine where the Cron job is running, execute $curl -V
The output should confirm that curl is installed, for example:   

2. Ensure the Cron job script has executable permissions

Run the $ ls -al <script_path> command to check permissions for the script used in the Cron job.
Info
For Example:
[testuser@test-machine]$ ls -al test.sh
-rwx------. 1 testuser testgroup 35 Apr 24 22:38 test.sh
NotesNote: From version 176800 onwards, manual replacement of the <ADMIN_API_KEY> is not required. You can directly copy and paste the generated Cron Job details into the crontab of the remote server. In such cases, you may skip Steps 3 and 4 and proceed directly to Step 5.

3. Generate the API key for the Admin user

Navigate to Settings → User Management → [Admin User] → Select “Click here” to generate the API key

4. Replace the placeholder in the Cron command

Update the Cron command by replacing <ADMIN_API_KEY> with the API key generated above.

5. Add the Cron job entry on the remote server

  1. On the remote Linux machine, open a terminal and run crontab -e to edit the user's Cron jobs.
  2. Paste the updated curl command (with the correct <ADMIN_API_KEY>) into the editor.
  3. Save and exit.

6. Verify connectivity to the Applications Manager server

If Cron job updates are not reflected in Applications Manager, confirm that the remote server can reach the Applications Manager server and port:

Quote
$ telnet <remote_server_ip_or_hostname> <port_number>
Replace:
  1. <remote_server_ip_or_hostname> with the IP address or hostname of the server where Applications Manager is running
  2. <port_number> with the port number used by Applications Manager (e.g., 9666)
Info
For Example:
telnet 127.0.0.1 9666
This will help verify if the remote server can access Applications Manager through the required port.

                  New to ADSelfService Plus?