Documentation

Find documentation for our Joomla extensions on this page.

JoomSMS Cron Setup Guide

Introduction

What is the Cron?

The JoomSMS cron is an automated task that runs in the background to process your SMS campaigns. Without it, SMS messages would only be sent when you manually click "Send" in the admin panel.

What Does Automatic Processing Do?

When properly configured, the cron will:

  • Send queued SMS messages - Processes messages waiting in the queue
  • Handle scheduled campaigns - Sends SMS at the date/time you specified
  • Process bulk campaigns - Sends large campaigns in batches without timing out
  • Run daily maintenance tasks - Handles automated triggers and cleanup

Important: Without a working cron job, scheduled and bulk SMS campaigns will not be sent automatically.


Quick Start

Follow these three steps to get your cron working:

Step 1: Get Your Cron URL

  1. Log in to your Joomla administrator panel
  2. Go to Components → JoomSMS → Configuration
  3. Click the Queue Processing tab
  4. Copy the Cron URL displayed at the top

Your cron URL will look like this:

https://yoursite.com/index.php?option=com_joomsms&ctrl=cron

Step 2: Set Up the Cron Job

Add a cron job on your hosting that calls this URL every 5-15 minutes. See the hosting-specific instructions below.

Step 3: Verify It's Working

  1. Return to Components → JoomSMS → Configuration → Queue Processing
  2. Check the Last Run field - it should show a recent time
  3. The Report field shows what happened during the last run

Step-by-Step Setup by Hosting Type

cPanel (Most Common)

  1. Log in to your cPanel account
  2. Find Cron Jobs under the "Advanced" section
  3. Click Cron Jobs
  4. Under "Add New Cron Job":

    • Common Settings: Select "Every 15 minutes" (or your preferred interval)
    • Command: Enter one of these commands:

    Using wget (recommended):

    wget -q -O /dev/null "https://yoursite.com/index.php?option=com_joomsms&ctrl=cron"
    

    Using curl:

    curl -s "https://yoursite.com/index.php?option=com_joomsms&ctrl=cron" > /dev/null 2>&1
    
  5. Click Add New Cron Job

Tip: Replace https://yoursite.com with your actual website address.


Plesk

  1. Log in to your Plesk panel
  2. Go to Websites & Domains → Select your domain
  3. Click Scheduled Tasks (or Cron Jobs)
  4. Click Add Task
  5. Configure:
    • Run: Select "Cron style" and enter */15 * * * * (every 15 minutes)
    • Command:
      wget -q -O /dev/null "https://yoursite.com/index.php?option=com_joomsms&ctrl=cron"
      
  6. Click OK

DirectAdmin

  1. Log in to your DirectAdmin panel
  2. Go to Advanced FeaturesCron Jobs
  3. Create a new cron job:
    • Minutes: */15 (or 0,15,30,45)
    • Hours: *
    • Days of Month: *
    • Months: *
    • Days of Week: *
    • Command:
      wget -q -O /dev/null "https://yoursite.com/index.php?option=com_joomsms&ctrl=cron"
      
  4. Click Add

Linux Command Line (SSH Access)

  1. Connect to your server via SSH
  2. Open the crontab editor:
    crontab -e
    
  3. Add this line at the bottom (runs every 15 minutes):
    */15 * * * * wget -q -O /dev/null "https://yoursite.com/index.php?option=com_joomsms&ctrl=cron"
    
  4. Save and exit (in nano: Ctrl+O, Enter, Ctrl+X)

Alternative using curl:

*/15 * * * * curl -s "https://yoursite.com/index.php?option=com_joomsms&ctrl=cron" > /dev/null 2>&1

Windows Task Scheduler

For Windows servers (IIS):

  1. Open Task Scheduler (search for it in the Start menu)
  2. Click Create Basic Task
  3. Name: JoomSMS Cron
  4. Trigger: Daily, then set to repeat every 15 minutes
  5. Action: Start a program
  6. Program/script: powershell
  7. Add arguments:
    -Command "Invoke-WebRequest -Uri 'https://yoursite.com/index.php?option=com_joomsms&ctrl=cron' -UseBasicParsing"
    
  8. Click Finish

External Cron Services

If your hosting doesn't support cron jobs, use a free external service:

cron-job.org (Free)

  1. Go to cron-job.org and create a free account
  2. Click Create cronjob
  3. Fill in:
    • Title: JoomSMS Cron
    • URL: Your cron URL (e.g., https://yoursite.com/index.php?option=com_joomsms&ctrl=cron)
    • Schedule: Every 15 minutes
  4. Click Create

EasyCron (Free tier available)

  1. Go to easycron.com and create an account
  2. Click + Cron Job
  3. Enter your cron URL
  4. Set execution interval to 15 minutes
  5. Click Create Cron Job

SetCronJob (Free tier available)

  1. Go to setcronjob.com
  2. Create an account
  3. Add your cron URL with desired frequency

JoomSMS Configuration Options

Where to Find Settings

Navigate to: Components → JoomSMS → Configuration → Queue Processing

Settings Reference

SettingDescriptionRecommended Value
Cron URL The URL your cron job must call Copy this exactly
SMS per Batch How many SMS to send each time the cron runs 50-100 for most users
Parallel Threads Number of simultaneous connections to SMS gateway 10 (increase if your server is powerful)
Cron Frequency Minimum time between cron executions 15 minutes (900 seconds)

SMS per Batch

Controls how many SMS messages are processed each time the cron runs.

  • Low volume (< 500 SMS/day): 25-50
  • Medium volume (500-5,000 SMS/day): 50-100
  • High volume (> 5,000 SMS/day): 100-200

Warning: Setting this too high may cause server timeouts. Start low and increase gradually.

Parallel Threads

Controls how many SMS are sent simultaneously. Higher values = faster sending, but require more server resources.

ValueBest For
1-5 Shared hosting, low-powered servers
10 Standard VPS, most users
20-50 Dedicated servers, high-volume sending
75-100 Enterprise servers with fast connections

Cron Frequency

The minimum time between cron executions. JoomSMS will skip execution if called more frequently.

  • 15 minutes (900 seconds) - Good for most campaigns
  • 5 minutes (300 seconds) - For time-sensitive messages
  • 1 hour (3600 seconds) - For low-priority, batch campaigns

Monitoring & Reports

Checking Last Cron Execution

In Components → JoomSMS → Configuration → Queue Processing, you'll see:

  • Last Run: Shows when the cron last executed
    • Displays as "X minutes ago" if recent
    • Shows full date/time if more than 8 hours ago
  • IP Address: The server IP that called the cron (useful for verification)
  • Report: Summary of what happened

Understanding the Cron Report

A typical report shows:

Cron triggered at 2024-01-15 14:30:00
Processed 45 messages: 43 sent successfully, 2 failed
  • Processed: Total messages attempted
  • Sent successfully: Messages delivered to SMS gateway
  • Failed: Messages that couldn't be sent (check detailed logs)

Email Notifications Setup

Configure email reports in Queue Processing settings:

OptionWhen Emails Are Sent
No Never send email reports
Each time Email after every cron run
Only when action taken Email only when SMS were processed
Only when something wrong Email only when errors occur

To configure:

  1. Select your preferred option from the Send Report dropdown
  2. Enter the recipient email address in Send To field
  3. Click Save

Tip: Start with "Only when something wrong" to avoid inbox clutter while still being notified of issues.

Log Files

For detailed troubleshooting, enable log file saving:

  1. Set Save Report to "Simplified report" or "Detailed report"
  2. The default log location is: media/com_joomsms/logs/report0.log
  3. Use See Report button to view the log
  4. Use Delete Report button to clear old logs

Troubleshooting

"Cron Never Runs"

Symptoms: Last Run shows old date or "Never"

Solutions:

  1. Test the URL manually

    • Copy your Cron URL and paste it directly in your browser
    • You should see a page load (may be blank or show a brief message)
    • If you get an error, your URL is wrong
  2. Check your cron job is active

    • Log in to your hosting panel
    • Verify the cron job exists and is enabled
    • Check the command syntax matches examples above
  3. Verify URL encoding

    • Some hosting panels require URL encoding
    • Try replacing & with %26 in the URL
  4. Check server firewall

    • Some servers block wget/curl requests
    • Try the opposite tool (curl instead of wget, or vice versa)
  5. Check for HTTP/HTTPS issues

    • If your site uses HTTPS, the cron URL must also use HTTPS
    • Try both http:// and https:// versions

"SMS Not Sending"

Symptoms: Cron runs but SMS stay in queue

Checklist:

  1. Is the SMS gateway configured?

    • Go to Components → JoomSMS → Sender Profiles
    • Verify your gateway has valid API credentials
  2. Is the message scheduled for the future?

    • Check the message's scheduled date/time
    • Make sure it's not set for a future date
  3. Are there enough credits?

    • Some gateways require prepaid credits
    • Check your gateway account balance
  4. Is the phone number valid?

    • Invalid phone numbers will fail silently
    • Check the message queue for error details
  5. Check the detailed logs

    • Enable detailed logging (see Log Files)
    • Look for specific error messages

"Too Slow" - Optimization Tips

Symptoms: Large campaigns take too long to send

Solutions:

  1. Increase SMS per Batch

    • Try increasing from 50 to 100 or 150
    • Monitor for timeout errors
  2. Increase Parallel Threads

    • If your server can handle it, increase to 20-50
    • Watch server CPU/memory usage
  3. Reduce Cron Frequency

    • Change from 15 minutes to 5 minutes
    • Note: Most hosting plans allow minimum 1 minute intervals
  4. Run cron more frequently

    • Set your hosting cron to run every 5 minutes
    • Set JoomSMS cron frequency to match
  5. Check your SMS gateway

    • Some gateways have rate limits
    • Contact your gateway provider about bulk sending options

Server Timeout Issues

Symptoms: Cron starts but doesn't complete, partial sending

Solutions:

  1. Reduce SMS per Batch

    • Lower to 25 or 30 messages
    • This prevents hitting PHP time limits
  2. Check PHP max_execution_time

    • Default is often 30-60 seconds
    • Ask your host to increase it for cron scripts
  3. Use CLI cron instead of URL

    • CLI crons have longer timeouts
    • Command: php /path/to/joomla/cli/joomsms_cron.php
  4. Enable "Continue on timeout"

    • JoomSMS automatically saves progress
    • Next cron run will continue where it left off

Best Practices

Use CaseCron IntervalSMS per BatchThreads
Standard campaigns 15 minutes 50 10
Time-sensitive alerts 5 minutes 30 10
High-volume campaigns 5 minutes 100 20-50
Shared hosting (limited) 15 minutes 25 5

Security Considerations

  1. Keep your Cron URL private

    • Don't share it publicly
    • Anyone with the URL can trigger your cron
  2. Use HTTPS

    • Always use https:// in your cron URL
    • Prevents URL interception
  3. Monitor for abuse

    • Check the "IP Address" field occasionally
    • Should match your server or cron service IP
  4. Consider IP restriction

    • Advanced users can restrict cron access by IP
    • Contact JoomBoost support for guidance

Performance Tips for High Volume

  1. Stagger large campaigns

    • Instead of 10,000 SMS at once, split into smaller batches
    • Schedule parts throughout the day
  2. Use off-peak hours

    • Schedule bulk campaigns for low-traffic times
    • Reduces server load during busy periods
  3. Monitor server resources

    • Watch CPU and memory during cron runs
    • Adjust settings if server becomes slow
  4. Use a dedicated SMS gateway

    • Enterprise gateways handle high volumes better
    • Consider gateways with bulk APIs
Cron Job Starts

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok