I have completed upload file saved in temp path. How to read those file in cron every time file was new.
1 Answer
Without seeing the full code and having a detailed description, it’s difficult to provide a final solution, but I can suggest a helpful approach. You can use the filemtime() function, which retrieves the last modified time of a file. To handle the files in your cron job, you could save the timestamp of the file when it’s processed in your workflow. Later, you can compare the saved timestamp with the current modified time of the file. If the file is newer, you can process it; otherwise, you can skip it if it has already been processed.