There is a task to parse xml from the folder where they are uploaded once an hour, and write everything to the database.

How can I implement it so that all files in a folder are parsed, and in the future it is not necessary to parse those that have already been read, i.e. just reappearing. Files are not deleted from the folder, they are simply added there.

  • It's simple, you need to note which files are already parsed. And on the crown to run a script for parsing every hour. - VasyOk
  • Can you give more details? ) - ilya d
  • iterate files through file: if file.modification_time <time.current - hour therefore parsit file.data - etki
  • You can check before parsing whether the file has already been processed. Moreover, in the database it may be useful information that came from. - maxleo
  • If it is not difficult, write a code sample. I somehow understand the head, but with the implementation of the problem) - ilya d

0