title: Fetching data with the Instagram API via cron jobs
body: <p>I have this script the logs a user into Instagram much like the found <a href="https://stackoverflow.com/questions/15109463/instagram-get-access-token-from-code-in-php">here</a>. Once the user is logged in and an access token is generated, the user is redirected to the <code>redirect_uri</code>, but with the <code>$_GET['code']</code> variable in the URL. Once the <code>redirect_uri</code> is loaded, a script is executed that loops thru an array of Instagram account ID's and gets info about each page. The problem is that the same code variable that's in the URL cannot be used more than once. Refreshing the page will not successfully get any info about the Instagram accounts because it needs to be unique. </p>
  
  <p>So, here is my question: can the script that is executed once the <code>redirect_uri</code> is loaded be executed via crons? I'm not sure how a cron would log into Instagram. Any ideas?</p>