css body, p, .post-body { font-family: 'Google Sans Text', sans-serif !important; } /* Apply Google Sans to Post Titles and Headings */ h1, h2, h3, h4, h5, h6, .post-title, .post h2 { font-family: 'Google Sans', sans-serif; font-weight: 500; }

Thursday, July 23, 2026

Setting up an auto Connect and Disconnect cron job in ASL3 to automatically connect one node to another node.

Some time ago I wrote and article on how to easily and automatically connect and disconnect an AllstarLink 3 (ASL 3) node on a schedule.  In that article you needed to leverage the ASL3 asterisk CLI tool (asterisk -rx) inside two basic bash scripts. Then, you map those scripts to system execution times using Linux's built-in crontab utility. 

The article is available HERE.

Note:  I know there are more than one way to effect these connections but here I concentrate on the newcomer to Linux and ASL3.

In this article I will provide an even simpler method to automatically connect and disconnect one node to another node.  We going to setup a cron job in ASL3 to automatically connect to other nodes.  Just a word of caution - you still need to monitor your dashboard as "murphy" can cause havoc at any time.  Please do monitor your dashboard or your radio for any connection issues. 

To set up an automatic connect and disconnect schedule on AllStarLink 3 (ASL3), you can execute Asterisk CLI commands directly inside the system's crontab. This method bypasses the older built-in Asterisk scheduler, making it highly reliable and easy to modify.

Follow this step-by-step guide to configure your scheduled connections.

Step 1: Open the System Crontab

Log into your ASL3 node via SSH. Open the root user's cron scheduler using your preferred text editor (like nano) by running:

bash

sudo export EDITOR=nano
sudo crontab -e

Step 2: Add Your Connect and Disconnect Cron Jobs

Scroll to the bottom of the crontab file and add your scheduling strings. Use the following format template:

text

# Structure: Minute Hour DayOfMonth Month DayOfWeek 
/usr/sbin/asterisk -rx "rpt fun <YourNode> <Command><TargetNode>"

Example Schedule:

If your local ASL3 node number is 61234 and you want to automatically join a weekly net on Node 55555 every Monday night:

  • Disconnect all active connections at 18:55 (6:55 PM) on Monday:

    text

    55 18 * * 1 /usr/sbin/asterisk -rx "rpt fun 61234 *76"

    (Note: *76 is the standard command to disconnect all links, serving as a clean slate before your net starts).

  • Connect to Target Node 55555 at 19:00 (7:00 PM) on Monday:

    text

    00 19 * * 1 /usr/sbin/asterisk -rx "rpt fun 61234 *355555"

    (Note: *3 is the standard link command followed by the target node ID).

  • Disconnect from the Target Node at 20:30 (8:30 PM) on Monday:

    text

    30 20 * * 1 /usr/sbin/asterisk -rx "rpt fun 61234 *155555"

    (Note: *1 is the specific link disconnect command). 

Step 3: Save and Verify

  1. Save the file in nano by pressing Ctrl + O, then Enter.

  2. Exit the editor by pressing Ctrl + X.

  3. Verify your entries are correctly loaded into the scheduler by running:

    bash

    sudo crontab -l

Quick Syntax Reference

  • Time Format: Crontab requires 24-hour military time.

  • Days of the Week: 0 or 7 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday.

  • Asterisk Path: Ensure you specify the full path /usr/sbin/asterisk so the cron daemon can find the execution file without environment paths.

Do I need a script file for this to work or will the above suffice?

The crontab lines provided above will work perfectly fine on their own without any external script files. For your goal of a simple but effective method, putting the commands directly into the crontab is the absolute best approach. It keeps your system clean because you do not have to manage, execute-protect, or worry about the file paths of separate script files.

Why this direct method is highly effective:

  • Fewer moving parts: The system reads the time, triggers the Asterisk command directly, and connects.

  • Easy to modify: If a net time changes, you just run sudo crontab -e and change the numbers in one single file.

  • No permission bugs: Running scripts sometimes fails if you forget to make the file executable (chmod +x). Direct cron commands avoid this completely.

The only rule to keep it working:

Just ensure that your node number and DTMF steering prefixes match your rpt.conf file. (For example, if your system uses something other than *3 for connect and *1 or *76 for disconnect, change those prefixes in the crontab strings to match your setup).

Here is an extract, optimized text block for your information.

This is added to the bottom of your crontab using  

sudo crontab -e:

text

# ====================================================================
# AUTO CONNECT & DISCONNECT SCHEDULE FOR NODE 49355
# ==================================================================== 
# SARL BULLETIN (Sunday Morning)
# Connect at 08:00 SAST, Disconnect at 08:30 SAST
00 08 * * 0 /usr/sbin/asterisk -rx "rpt fun 49355 *33373742"
30 08 * * 0 /usr/sbin/asterisk -rx "rpt fun 49355 *13373742"

# AMATEUR RADIO TODAY (Sunday Morning)
# Connect at 09:55 SAST, Disconnect at 11:05 SAST
55 09 * * 0 /usr/sbin/asterisk -rx "rpt fun 49355 *33373742"
05 11 * * 0 /usr/sbin/asterisk -rx "rpt fun 49355 *13373742"

Pro-Tips for Your Setup: 

• Time Zone Check: Ensure your underlying Linux operating system is set to South African Standard Time (SAST) by typing date in the command line. Cron follows the system clock. 

 • The Asterisk *3 and *1 commands: These lines assume your system uses standard Transmit/Receive (permanent or normal) linking prefixes. If you prefer to use Monitor Only (receive only) mode for the Sunday news bulletins so local transmissions don't interrupt the broadcast, change the connection prefix from *3 to *2 (e.g., *23373742). 

Verification Reminder:

After saving the changes, remember to type date into your SSH terminal to make sure your Linux system clock is actually synchronized to local South African time, as cron relies strictly on the system time to execute.

Finally

That's it you now have an automated connect and disconnect schedule that will assist you in connecting to other nodes.  Just a reminder to monitor you dashboard to ensure that the setup runs smoothly.

HAMNET MeshCore Western Cape Tech Talk Video

      HAMNET MeshCore Western Cape Tech Talk Video  The Boland Amateur Radio Club (BARC) invited me to do this talk on 23 July 2026. HAMNET ...