A cron job runs a task on a fixed schedule, from your web server or an online cron service. Set up a cron job for Intagrate Pro and your accounts check Instagram and post new media at the times you choose, whether or not anyone visits your site.
Why use a cron job
Every Intagrate account has a Frequency setting that decides what makes it post (see account settings). The Constant and Scheduled frequencies both wait for someone to visit your site, so on a quiet site new Instagram posts can take a while to appear. Each visit that triggers them also does the posting work while that visitor waits.
With Cron Job, an outside schedule calls a URL on your site instead. Posting happens on time, every time, and visitors never wait for it.
1. Set the account to Cron Job
Edit the account in Intagrate > All Accounts, set Frequency in the Posting Settings box to Cron Job, and click Update. Do this for each account you want to run by cron.
2. Copy the cron URL
There are two kinds:
- Every Cron Job account: in Intagrate > Settings, under Cron Job on the Global Settings tab (see settings). It looks like
https://example.com/wp-admin/admin-ajax.php?action=instagrate. - One account: in that account’s Useful Links box. It ends with
&account_id=and the account’s ID.
The URL only runs accounts whose Frequency is Cron Job, and only published ones. It works for requests that aren’t logged in to WordPress, which is how cron jobs call it.
3. Call it on a schedule
How often depends on how often you post. Every 15 minutes gets new posts across quickly; once an hour is plenty for most sites.
From your host
Most hosts let you add cron jobs in their control panel. In cPanel, it’s Cron Jobs under Advanced (cPanel’s guide). Choose how often it runs, and use this command, with your own URL in quotes:
curl -s "https://example.com/wp-admin/admin-ajax.php?action=instagrate" > /dev/null
Or with wget:
wget -q -O /dev/null "https://example.com/wp-admin/admin-ajax.php?action=instagrate"
Keep the quotes: without them, the & in an account’s URL breaks the command.
From an online cron service
If your host has no cron jobs, a free service such as cron-job.org or EasyCron can call the URL for you. Create a job, paste the URL and pick the schedule. Nothing to install.
Check it’s working
Post something new on Instagram, wait for the next run, and check the account’s Instagram Media box: the new media should show as Posted. If it stays Pending, open the URL once in a private browser window, so you’re not logged in to WordPress (it shows a blank page), then look again. In a window where you’re logged in, the URL does nothing and shows 0. Still nothing? Work through troubleshooting, which starts with the connection to Instagram.
WordPress’s own scheduler
Some sites turn off WordPress’s built-in scheduler (WP-Cron) with DISABLE_WP_CRON in wp-config.php and run wp-cron.php from a server cron instead. That’s fine with Intagrate, as long as wp-cron.php really is run regularly: the Scheduled frequency and the daily renewal of each account’s Instagram connection both use it. The Intagrate cron URL above is separate and doesn’t replace it.