Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    How to Fix DirectAdmin Cron Jobs Not Working: Setup, Permissions & Troubleshooting Guide

    Priya

    Content Writer & Researcher

    Last Updated: 28 June 2026
    How to Fix DirectAdmin Cron Jobs Not Working: Setup, Permissions & Troubleshooting Guide
    🖥️

    Stop Wasting Hours Debugging Cron Job Failures in DirectAdmin

    CloudHouse Technologies manages cron job setup, PHP path configuration, and permission fixes across DirectAdmin servers — so your scheduled tasks run reliably every time. Let's resolve this today.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    If your DirectAdmin cron job is not working, you are not alone. Cron failures are one of the most frustrating issues hosting administrators face — the job appears to be set up correctly, yet nothing runs. Silent failures, wrong PHP paths, broken permissions, and misconfigured environment variables are the usual culprits. This guide walks you through every known cause and fix, from basic setup verification to advanced debugging techniques that experienced sysadmins use.

    How DirectAdmin Cron Jobs Work

    DirectAdmin cron jobs are managed through the system's cron daemon (crond), which reads per-user crontab files stored under /var/spool/cron/. When you create a cron job through the DirectAdmin panel (Advanced Features → Cron Jobs), DirectAdmin writes the entry into that user's crontab file.

    The key difference from cPanel is that DirectAdmin cron jobs run from the user's home directory (/home/username/), not from public_html. Scripts that rely on relative paths will break because the working directory is not what most developers expect.

    Cron jobs also run in a minimal shell environment. The full user PATH is not available. Commands like php, python, or wp must be referenced by their full absolute path, or cron will report "command not found" — silently, unless you have output logging set up.

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step 1: Verify the Cron Job Is Actually Saved

    1Check via DirectAdmin panel

    Log into DirectAdmin → Advanced Features → Cron Jobs. Confirm your entry appears with the correct schedule fields (minute, hour, day, month, weekday) and command. If the interface shows the job but it does not appear to run, the issue is in the command itself, not the schedule.

    2Verify the crontab file directly via SSH
    crontab -l -u username

    Replace username with the DirectAdmin account username. If the cron entry is missing here, it was not saved correctly. Re-add it through the panel or directly with crontab -e -u username.

    3Confirm crond is running
    systemctl status crond
    # or on older systems:
    service crond status

    If crond is stopped, all cron jobs on the server will fail silently. Start it with:

    systemctl start crond
    systemctl enable crond
    1Find the correct PHP binary path
    which php
    # Common results:
    # /usr/local/bin/php
    # /usr/bin/php
    # /opt/cpanel/ea-php82/root/usr/bin/php

    If you are running multiple PHP versions via CustomBuild, list them all:

    ls /usr/local/php*/bin/php
    2Use the full path in your cron command

    Wrong:

    * * * * * php /home/username/public_html/cron.php

    Correct:

    * * * * * /usr/local/bin/php /home/username/public_html/cron.php
    3For WordPress WP-Cron
    */5 * * * * /usr/local/bin/php /home/username/public_html/wp-cron.php > /dev/null 2>&1
    4For Python scripts
    0 * * * * /usr/bin/python3 /home/username/scripts/task.py >> /home/username/cron.log 2>&1
    1Redirect output to a log file

    Modify your cron command to append both stdout and stderr to a log file:

    30 2 * * * /usr/local/bin/php /home/username/public_html/cron.php >> /home/username/cron_debug.log 2>&1

    After the next scheduled run, check the log:

    cat /home/username/cron_debug.log
    2Enable email output in DirectAdmin

    In the Cron Jobs panel, enter your email address in the "Send all Cron output to email" field. Cron will email you the output of every run. Note: this only works if cron output is not being redirected to /dev/null.

    3Test the command manually via SSH first

    Always test your cron command by running it directly in the terminal as that user before trusting cron to run it:

    su - username -c "/usr/local/bin/php /home/username/public_html/cron.php"

    If it fails here, you have found your problem. Fix the command before adding it to cron.

    1Fix directory permissions up the path chain
    chmod 755 /home/username
    chmod 755 /home/username/public_html
    chmod 644 /home/username/public_html/cron.php
    2Fix shell script permissions
    chmod 755 /home/username/scripts/backup.sh
    3Check ownership
    ls -la /home/username/public_html/cron.php

    The file should be owned by the DirectAdmin username, not root. Fix with:

    chown username:username /home/username/public_html/cron.php
    1Set PATH explicitly at the top of your crontab
    PATH=/usr/local/bin:/usr/bin:/bin
    30 2 * * * php /home/username/public_html/cron.php

    Add this line before your cron entries via crontab -e -u username.

    2Set HOME explicitly if your script needs it
    HOME=/home/username
    PATH=/usr/local/bin:/usr/bin:/bin
    * * * * * /usr/local/bin/php /home/username/public_html/task.php
    3Handle relative include paths in PHP scripts

    Scripts that use include('../config.php') will fail in cron because the working directory is /home/username/, not /home/username/public_html/. Fix by using absolute paths in your PHP:

    <?php
    define('BASE_PATH', '/home/username/public_html/');
    include(BASE_PATH . 'config.php');
    ?>
    1Use full paths to wget/curl
    */10 * * * * /usr/bin/wget -q -O /dev/null "https://yourdomain.com/cron.php?key=secret"
    2Quote the URL if it contains ampersands

    Unquoted URLs with & parameters get truncated by the shell. Always wrap the URL in quotes:

    */5 * * * * /usr/bin/curl -s "https://yourdomain.com/wp-cron.php?doing_wp_cron" > /dev/null 2>&1
    3Check SSL certificate issues with curl
    # Test manually first:
    curl -v "https://yourdomain.com/cron.php"
    # If SSL fails, add --insecure (for internal scripts only):
    curl -s --insecure "https://localhost/cron.php"
    1Check cron log (CentOS/AlmaLinux/CloudLinux)
    grep CRON /var/log/cron | tail -30
    2Check cron log (Debian/Ubuntu)
    grep CRON /var/log/syslog | tail -30
    3Use journalctl for systemd-based servers
    journalctl -u cron --since "1 hour ago"
    # or for crond:
    journalctl -u crond --since "1 hour ago"

    If the log shows the job triggering but it produces no result, the problem is in the script or environment. If the log shows no trigger at all, crond is not running or the crontab entry has a syntax error.

    4Validate crontab syntax
    # Check for syntax issues:
    crontab -l -u username | grep -v "^#" | grep -v "^$"

    Common syntax error: using */1 instead of * for "every minute", or missing a field in the five time fields.

    1Check if cron is enabled for the user package

    In DirectAdmin admin panel → User Management → click the username → Account Configuration. Verify "Cron Jobs" is set to yes. If it is set to no, the user cannot create cron jobs at all — the entry simply does not get saved.

    2Check reseller package limits

    Resellers may have limited the number of cron jobs available to a user. Navigate to Reseller Level → Manage User Packages and verify the cron job limit is not set to 0.

    Cron Job Not Sending Email Output

    If you configured cron to email you output but emails are not arriving:

    • Make sure your cron command does NOT redirect to /dev/null — that suppresses all output including email
    • Cron only emails when there is output — a job that runs silently sends nothing
    • Check spam folders — DirectAdmin sends from the system's root@hostname address
    • Verify the server's local mail delivery is working: echo "test" | mail -s "cron test" your@email.com
    • The error "Cron emails can only be locally delivered" means your SMTP relay is blocking outbound cron mail — use local delivery or set MAILTO="" to suppress

    Quick Reference: Cron Job Troubleshooting Checklist

    • ✅ crond service is running (systemctl status crond)
    • ✅ Cron entry exists in crontab -l -u username
    • ✅ Command uses full absolute path to interpreter (/usr/local/bin/php)
    • ✅ Script file exists and is readable
    • ✅ Permissions: directories 755, scripts 644 (PHP) or 755 (shell)
    • ✅ File ownership matches username, not root
    • ✅ Command tested manually via SSH as the user and works
    • ✅ Output redirected to log file for debugging (>> /home/username/cron.log 2>&1)
    • ✅ URLs are quoted if they contain & parameters
    • ✅ Cron Jobs feature is enabled in the DirectAdmin account configuration

    For persistent cron failures on a managed server, or if you need to set up complex scheduled task automation across multiple DirectAdmin accounts, CloudHouse Technologies' server management service provides expert hands-on support to diagnose and resolve cron issues fast.

    FAQs

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    The most common causes are: crond is not running on the server, the cron entry was not saved correctly (check crontab -l -u username via SSH), or the Cron Jobs feature is disabled in the user's DirectAdmin account configuration. Run systemctl status crond to verify crond is active, then confirm your entry exists in the crontab file.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    Struggling With DirectAdmin Cron Jobs?

    Silent cron failures cost you time and frustration. Our server management team diagnoses cron job issues fast — from PHP path mismatches to account-level restrictions. CloudHouse handles it so you don't have to.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top