How to Fix Joomla Cron Jobs That Work Manually but Not Automatically
When a Joomla cron command succeeds from a shell but fails unattended, Joomla itself is often not the difference. The automatic job may use another PHP binary, user account, working directory, environment, or set of permissions. Compare the successful manual run with the cron runtime one difference at a time.
Record a known-good manual command
- Run the intended Joomla CLI command manually.
- Confirm the scheduled work actually completes, not merely that the command exits.
- Record the exact PHP executable, absolute Joomla path, CLI arguments, shell user, and working directory.
- Save the command exactly as tested before changing the cron entry.
This gives you a working baseline to compare with the unattended invocation.
Use absolute paths in cron
Cron normally starts with a much smaller environment than an interactive shell. Avoid depending on aliases, a current directory, or a PHP executable found only through your login shell's PATH. Use the full path to the intended PHP binary and the full path to Joomla's cli/joomla.php.
If the command reads or writes relative paths inside a third-party task, also verify the working directory expected by that extension.
Compare the PHP runtime
Hosting accounts can expose several PHP versions and separate configuration files for web and CLI execution. Confirm cron invokes the same intended PHP version as the successful test. Compare loaded extensions, memory_limit, time limits, timezone, and other settings relevant to the task.
A command that works with one PHP binary can fail immediately when cron invokes another.
Check the cron user, permissions, and environment
Confirm the unattended user can read Joomla's files and configuration and can write to every directory the task legitimately needs, such as logs, temporary storage, cache, exports, or extension-specific locations. Do not make the site broadly writable as a shortcut.
Also identify environment variables, credentials, proxy settings, or external commands available in the manual shell but absent from cron. Configure required values explicitly using supported hosting or extension settings.
Capture unattended output
Temporarily capture standard output and standard error to a protected log, or use the hosting control panel's cron history. Check the log immediately after the expected run. Errors such as “command not found,” a missing PHP extension, permission denial, or an invalid path often identify the difference before Joomla fully starts.
Remove or rotate temporary diagnostic logs after the issue is resolved, especially if they can contain paths, credentials, or task data.
Prove the automatic fix
- Change only the difference supported by the evidence.
- Keep the known-good manual command for comparison.
- Allow cron to invoke the job on its normal schedule.
- Review cron output and Joomla Scheduled Task history where applicable.
- Verify the task's real-world result.
A second successful manual run is not proof. The repair is complete only when the unattended invocation succeeds consistently.
Need More Help with Joomla?
Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.
Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.
QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.