Create a service together with the Ruby on Rails app

Asked

Viewed 193 times

0

I’m developing a new project using the 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 pick up information I have to read a folder, open the TXT files and process. If you want to record send information I have to write in TXT file in another folder that the application takes care of the rest.

How to read and record TXT I have already been able to implement, my question is:

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

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

1 answer

1


Use cron, Gem Whenever helps a lot.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.