I have a rails application that is serving as a backend API and Indexer that has to display the most up to date information for a number of different products. So, and this is not by my design, the only way that we can get updates from the current system is by receiving a number of XML files at random and numerous points throughout the day, which I need to scrape and put into my DB.
So my question is two fold and has to do with how I can execute such a job.
First, I have looked around at various cron executors in Ruby and seen that the whenever gem is a popular choice for basic scheduled cron tasks, but since this isn't a scheduled cron job I was wondering how I could prompt such an event and what tools I could use to accomplish this.
Second, I was wondering if it was at all possible to trigger the cron jobs from my first question whenever a directory in the Rails App was updated? I.E. whenever I get a new XML file in that directory I execute my script to scrape it and put it in the DB.
Thanks!