If you've just launched a phpFox social network, you might notice that some things don't quite happen on time. Email notifications trail in late, activity feeds feel sluggish, and scheduled tasks never seem to fire. Nine times out of ten, the culprit is a missing (or misconfigured) cron job.
phpFox depends on a background scheduler to handle a huge amount of behind-the-scenes work. In this guide, we'll walk through exactly what the cron job does, why it matters, and how to set it up in DirectAdmin in just a few minutes. Grab a coffee — this is easier than it sounds.
What Does the phpFox Cron Job Actually Do?
Think of the cron job as the heartbeat of your community. On a regular schedule, phpFox needs to run maintenance and processing tasks that would be too heavy to do on every page load. These include:
- Sending queued email and push notifications
- Processing and updating activity feeds
- Cleaning up temporary files and expired sessions
- Handling scheduled posts and reminders
- Updating statistics and cache data
- Running membership or subscription-related tasks
Without a working cron job, phpFox tries to do some of this on-the-fly, which slows your site down and leaves many tasks simply undone. A properly scheduled cron keeps everything smooth and timely.
Important: phpFox recommends the cron job run every minute. This ensures notifications and feeds stay near-real-time for your members.
Before You Begin
You'll want a couple of details ready:
- Your DirectAdmin login (provided in your Hostiso welcome email)
- The exact path to your phpFox installation on the server
- Your PHP version (usually not required, but handy to know)
On Hostiso's NVMe DirectAdmin hosting, PHP and the cron system are already pre-configured and optimized, so you won't need to install anything extra — you just point cron at the right file.
Finding Your phpFox Cron File Path
phpFox includes a dedicated cron script. Depending on your version, it's typically located at one of these paths inside your installation:
/home/username/domains/yourdomain.com/public_html/cron.phpOr for newer phpFox versions:
/home/username/domains/yourdomain.com/public_html/console cron:runNot sure of your exact path? Open File Manager in DirectAdmin, navigate to your phpFox folder, and look for the cron.php file (or the console file). You can confirm the full path in the address/breadcrumb bar. Replace username and yourdomain.com with your real values.
Step-by-Step: Adding the Cron Job in DirectAdmin
- Log in to DirectAdmin using your Hostiso credentials.
- From your dashboard, find the Advanced Features section and click Cron Jobs.
- You'll see a form with fields for scheduling: Minute, Hour, Day, Month, Day of Week, and the Command box.
- To run the job every minute, enter the following values:
- Minute:
* - Hour:
* - Day:
* - Month:
* - Day of Week:
*
- Minute:
- In the Command field, paste the command that runs your phpFox cron file. For a standard
cron.php:
For newer console-based phpFox:/usr/local/bin/php /home/username/domains/yourdomain.com/public_html/cron.php/usr/local/bin/php /home/username/domains/yourdomain.com/public_html/console cron:run - Click Add to save. That's it — your cron job is now live!
Pro Tip: The path/usr/local/bin/phpis the standard PHP binary location on Hostiso servers. If you need a specific PHP version, you can usually use a versioned path like/usr/local/bin/php82for PHP 8.2. Check the Select PHP Version tool in DirectAdmin if unsure.
Silencing Cron Emails (Optional but Recommended)
By default, cron may email you the output every single minute — which quickly fills your inbox. To keep things quiet, add this to the end of your command:
/usr/local/bin/php /home/username/domains/yourdomain.com/public_html/cron.php >/dev/null 2>&1The >/dev/null 2>&1 part simply discards the output, so you only hear about your site when there's something worth acting on.
Verifying Your Cron Job Is Working
Once you've added the cron, give it a few minutes and then confirm it's running:
- Check inside phpFox: Log in to your AdminCP and look at the dashboard or maintenance area. Many phpFox versions display the