Cron Job
Introduction
Cron Job manages scheduled tasks and background job processing for your UddoktaPay installation. Notifications, queue processing, and automated tasks require a properly configured cron job.
Access Cron Job from Administration → System Settings → Cron Job.
WARNING
Without a configured cron job, notifications won't send, queued jobs won't process, and scheduled tasks won't run. Set this up immediately after installation.
Last Cron Run
Displays when the cron job last executed successfully.
Status indicators:
- Never — Cron job not configured or hasn't run yet
- Date/Time — Last successful execution timestamp
Check this status regularly to ensure your cron job is running correctly.
Setup Instructions
Two methods are available for setting up the cron job. Choose the one that works best with your hosting environment.
Web Cron via cURL
Use this method if your hosting control panel supports web cron (URL-based scheduling).
The Cron Job page displays a unique cURL command for your installation.
Setup in hosting control panel:
- Log into your hosting control panel (cPanel, Plesk, etc.)
- Navigate to Cron Jobs section
- Add new cron job
- Frequency: Every minute (
* * * * *) - Command: Copy the "Web Cron via cURL" command from the Cron Job page
- Save
Copy button: Click the copy icon next to the command to copy it exactly.
Full Path Command
Use this method for direct server access via SSH or advanced control panels.
The Cron Job page displays the complete command with your exact server paths.
Setup via SSH:
- Connect to server via SSH
- Open crontab editor:
crontab -e - Add this line with your exact command from the Cron Job page:
* * * * * [your-full-path-command-here] >> /dev/null 2>&1- Save and exit
Setup via control panel:
- Navigate to Cron Jobs
- Add new cron job
- Frequency: Every minute (
* * * * *) - Command: Copy the "Full Path Command" from the Cron Job page
- Save
TIP
Always copy commands directly from the Cron Job page—they contain your unique installation paths and security tokens. Never use commands from tutorials or other installations.
Requirements:
- PHP 8.2+ with IonCube Loader
- Correct PHP binary path
- Laravel artisan file accessible
- Write permissions to storage directory
Run Cron Manually
Test cron execution without waiting for the scheduled run.
To run manually:
- Click Run Cron Manually
- System executes all pending scheduled tasks
- "Last Cron Run" updates to current time
- Check results or errors in output
Use cases:
- Test cron configuration
- Process pending queue jobs immediately
- Verify scheduled tasks execute correctly
- Trigger notifications without waiting
WARNING
Manual execution doesn't replace automated cron setup. It's only for testing and immediate processing.
Troubleshooting
Last Cron Run shows "Never"
Problem: Cron job never executed.
Solution:
- Verify cron job added in hosting control panel
- Check frequency is set to every minute (
* * * * *) - Confirm command copied exactly from Cron Job page
- Wait 1-2 minutes and refresh page
- Click "Run Cron Manually" to test
- Check server logs for errors
Cron stopped running
Problem: Last run time is old (hours/days ago).
Solution:
- Check cron job still exists in control panel
- Verify hosting account is active
- Check PHP version supports PHP 8.2+
- Ensure IonCube Loader is installed
- Review server error logs
- Test with "Run Cron Manually"
Notifications not sending
Problem: Cron runs but notifications don't send.
Solution:
- Verify "Last Cron Run" updates every minute
- Check queue configuration is correct
- Verify notification channels enabled (Brand Settings → Notifications)
- Check mail settings if using email notifications
- Review notification channel logs
Permission denied errors
Problem: Cron fails with permission errors.
Solution:
- Ensure PHP binary path is correct
- Check artisan file is executable:
chmod +x artisan - Verify web server user has write access to storage/
- Check log file permissions in storage/logs/
- Contact hosting support if permissions can't be changed
Wrong PHP version
Problem: Cron uses old PHP version.
Solution:
- Use Full Path Command method
- Verify the command points to PHP 8.2+ binary
- Test PHP version:
/path/to/php -v - Update cron command with correct PHP path
- Ensure IonCube Loader enabled for that PHP version
Command not found
Problem: Server can't find PHP or artisan.
Solution:
- Copy the exact Full Path Command from Cron Job page
- Don't modify paths manually
- Verify paths exist on server
- Check file permissions
- Contact hosting support for correct PHP path
TIP
After configuring the cron job, wait 1-2 minutes and refresh the page. "Last Cron Run" should update to the current time. If it doesn't, review your cron configuration.
Best Practices
Setup:
- Configure cron job immediately after installation
- Always copy commands from Cron Job page
- Test with "Run Cron Manually" after setup
- Monitor "Last Cron Run" daily for first week
Monitoring:
- Check "Last Cron Run" updates every minute
- Set up alerts if cron stops running
- Review scheduled task logs regularly
- Monitor queue processing times
Maintenance:
- Recheck cron after server migrations
- Verify after hosting control panel updates
- Update if displayed commands change after updates
- Keep cron job settings backed up
Performance:
- Don't run cron more frequently than every minute
- Monitor server resources during cron execution
- Optimize long-running scheduled tasks
- Use queue for time-intensive operations
