Create a service together with the Ruby on Rails app

0

I'm developing a new project using Ruby on Rails to communicate with a legacy system made in COBOL. This communication will be done through TXT files, that is, when I have to get information I have to read a folder, open the TXT files and render. If you want to save send information I have to write to TXT file in another folder that the application will take care of the rest.

How to read and write TXT I've already implemented, my question is:

How to implement Rails in a process or service that is running in background , in this process I configure that at given time it checks if there are TXT files in a certain directory, read the contents, process, move or delete the TXT file. Another process I have to implement is to check if there is information so I can export in TXT to the legacy system.

Just highlighting this process has to be activated when the Rails app is started.

    
asked by anonymous 16.04.2014 / 17:04

1 answer

1

Use cron, gem whenever helps a lot.

    
16.04.2014 / 21:37