My team and I are building a Magento website for a client and we need to regularly perform data exports from another server to the Magento server.
I'd like to call a custom admin action from another server to start the import of a file sent via FTP on the Magento server.
- How can I remotely access to Admin actions ?
- Should I use cURL and the admin URL, customized magento SOAP API or REST API requests ?
I've never used any of the above (I've used Magento SOAP API but I haven't customized it), so please mind to redirect me to tutorials or explain thoroughly.
PS : I thought of using Cron job to import regularly (night time), but then I'd need to be sure the cron is launched after the FTP transfer (in case of slow connection) and that the server has the last version (stamped with current date). Is there a way to postpone a cron job without modifying the original ? Like a Magento way to say "sleep(15minutes)" to a cron job, or maybe should I check within my scrip and use "sleep()" until file is uploaded and updated ? (I would cancel the import and notify an admin after X hours of postponing)