A practical example
Checking for new import files
A small internal application may receive CSV files in a watched directory. Running an import check every five minutes keeps the delay short without maintaining a process that watches the folder continuously. The importer should move or mark successful files so the next run can skip them.
Before saving the change
- Use absolute paths for both the importer and its input directory.
- Make repeated processing safe if a previous run exits after importing but before cleanup.
- Confirm the command completes in less than five minutes or add a lock.