Answers.Body: <p>You can create an API with <code>civix generate:api</code>. More information can be found under <em>Add an API function</em> in the <a href="https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-api" rel="nofollow noreferrer">Civix page</a> of the Developer Guide.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-26T07:20:36.177Z
Answers.LastActivityDate: 2017-10-26T20:42:58.487Z
Answers.LastEditDate: 2017-10-26T20:42:58.487Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>In my extension, I can now import some data (contact and membership) from a csv file through a specific download form.</p>
  
  <p>I need now to create a scheduled import, that search, once a day, a folder for the csv presence. The php with the internal routed URL is now ready but I don't know how to periodically call it: </p>
  
  <ul>
  <li>calling the routed page URL, ask me for credentials before executing</li>
  <li>create a scheduled job, needs, from what I understand, a specific API</li>
  </ul>
  
  <p>How can I do?</p>
  
  <p>Thanks</p>
  
Tags: <cron-job><scheduling>
Title: Scheduled FTP data import
ThreadText: # Scheduled FTP data import
  
  (Asked by: username_0 on 2017-10-26)
  
  In my extension, I can now import some data (contact and membership) from a csv file through a specific download form.
  
  I need now to create a scheduled import, that search, once a day, a folder for the csv presence. The php with the internal routed URL is now ready but I don't know how to periodically call it:
  
  * calling the routed page URL, ask me for credentials before executing
  * create a scheduled job, needs, from what I understand, a specific API
  
  How can I do?
  
  Thanks
  
  **Tags:** cron-job, scheduling
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-10-26. Score: 1
  
  You can create an API with `civix generate:api`. More information can be found under *Add an API function* in the [Civix page](https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-api) of the Developer Guide.
  
  
  ---
  
  