Setting up cron jobs
A cron job runs a command or script automatically on a schedule - handy for sending reports, clearing caches, or driving WordPress scheduled tasks reliably. In the DirhamHost panel, open Cron Jobs.
To create one:
- Choose a schedule using the timing fields (minute, hour, day, month, weekday) or a common preset like "Once per hour".
- Enter the command to run.
- Click Add New Cron Job.
Common examples:
- Run a PHP script:
/usr/bin/php /home/USER/public_html/script.php - Trigger WordPress cron every 5 minutes:
*/5 * * * * wget -q -O /dev/null "https://yourdomain.ae/wp-cron.php?doing_wp_cron" - Database backup nightly at 2am: a
mysqldumpcommand.
Tips: use full paths, redirect output to /dev/null to avoid a flood of emails, and test the command once manually first. Setting a schedule too frequently (e.g. every minute) can strain resources - hourly or a few times a day is usually enough. If your cron does not appear to run, check the command path and that the script has correct permissions. We can help you build the exact command - just ask on WhatsApp +971 58 553 6767.
Still need a hand? Our UAE-based team is here 24/7.