Scheduling
Pipes run on their own only when something calls JoomGrabber at regular times. You can use a web cron URL or Joomla's command line. Either way, JoomGrabber then runs the pipes whose schedule is due.
1. Turn on the schedule
Open Configuration in the JoomGrabber sidebar, tab Cronjob / Schedule:
| Option | What it does |
|---|---|
| Enable Cronjob / Schedule | Yes lets the cron job run pipes. No means pipes only run with Manual Post |
| Cronjob Secret key | Required for the web cron URL. Use a long random value. The field's help says an empty key disables the check; in fact an empty key blocks the web cron |
| Pipes Limit | How many pipes one call runs: 1 to 15, or all published pipes. Keep it low on shared hosting |
| Schedule | The default interval: 1, 5, 10, 15, 20 or 30 minutes, or 1, 2, 3, 4, 6, 8, 12 or 24 hours. Default 3 hours |
| Start at | When the schedule starts |
| Check Cron Time | Leave it on No. Yes is only for a few special servers |
Each pipe can have its own interval in the Schedule list of the pipe editor. Use Global follows the default above.
2a. Call the web cron URL
https://example.com/index.php?option=com_joomgrabber&task=callaio&secretkey=YOUR_KEY
Add a cron job in your hosting control panel that opens this URL every few minutes, for example with:
*/5 * * * * curl -s "https://example.com/index.php?option=com_joomgrabber&task=callaio&secretkey=YOUR_KEY" > /dev/null
or wget -q -O /dev/null "...". An outside cron service works too.
Without a secret key in the options, the URL answers "Secret key is not configured". With a wrong key it answers "Invalid Secret Key" and runs nothing. The dashboard's Run Web Cron button opens the URL for you.
Call the URL more often than your shortest pipe interval. A call every 5 minutes is enough for pipes that run every 30 minutes or every few hours.
2b. Use Joomla's command line
If you can run commands on the server, the Console - JoomGrabber plugin is the most reliable way. It has no web timeout and needs no secret key.
# Run the pipes that are due, like the web cron (use this in crontab)
php /path/to/joomla/cli/joomla.php joomgrabber:run
# Work through every due pipe in one go, at most 10 minutes
php cli/joomla.php joomgrabber:run --drain --max-time=600
# List the pipes and their IDs
php cli/joomla.php joomgrabber:list --published
# Run pipe 12 now, ignoring the schedule, at most 5 items, with details
php cli/joomla.php joomgrabber:pipe:run 12 --limit=5 -v
| Command | Options |
|---|---|
joomgrabber:run |
--drain keeps going until every due pipe is done; --max-time limits --drain in seconds (default 300, 0 = no limit) |
joomgrabber:list |
--published lists only the pipes the schedule runs |
joomgrabber:pipe:run <id> |
--limit processes at most this many items (0 = all); --force runs even if the schedule is in the middle of this pipe |
All commands take --user=<id or username>. The default is the guest user, as with the web cron. Run as a user when an adapter needs one, for example to set the author.
A crontab line for every 5 minutes:
*/5 * * * * php /path/to/joomla/cli/joomla.php joomgrabber:run > /dev/null 2>&1
How the schedule decides
At each call JoomGrabber checks which published pipes are due, by their own interval or the global one, and runs up to Pipes Limit of them. A pipe that is still running is not started twice. Long pipes continue at the next call.
If pipes don't run
- The dashboard shows Cronjob is not configured or inactive when the schedule is off.
- Open the web cron URL in a browser: it shows what was run, or why not.
- Check that the pipe is Published.
- Look at the logs.
- If the web cron times out, use the command line instead.