Pair this page with Triggers for guidance on duplicate detection and batching when many files land at once.
When to use file watchers
Use file watchers when:- Producers write to SMB/NFS shares or on-premises folders without an S3-compatible API.
- Your cloud storage does not yet have event notifications configured, and you accept polling latency.
- You need a controlled scan of a directory tree on a schedule independent of external event buses.
Polling-based file watcher
Define the monitored root
In Planasonix, specify the root path or connection that resolves to a directory the runtime can read. Use a service account or technical user with read (and optionally list-only where supported) on that path.
Set path patterns
Configure include patterns (for example,
**/*.csv, incoming/**/*.parquet) and exclude patterns (for example, **/*.tmp, **/.staging/**) so transient files do not start runs.Choose polling interval
Set the poll interval to balance latency and load. High-frequency polls increase I/O and API calls; low-frequency polls delay processing. Start with 30–120 seconds for batch file drops and tighten only if SLAs require it.
Path patterns
Glob-style patterns help you scope watchers:| Pattern | Matches |
|---|---|
*.csv | CSV files in the immediate directory |
**/*.csv | CSV files in nested folders |
orders/2025/*/*.parquet | Partitioned layouts with year shard |
Polling interval tradeoffs
Latency vs load
Latency vs load
Shorter intervals reduce time-to-run but amplify list operations on large directories. If the watcher must walk deep trees, consider restructuring drops into dated subfolders and pointing the watcher at the current date prefix only.
Clock and timezone
Clock and timezone
When filenames embed timestamps, confirm the watcher’s timezone matches producer conventions so “today’s folder” resolves correctly around midnight and DST changes.
Agent-based watching for on-premises file systems
When Planasonix runs a lightweight agent in your network, the agent streams change notifications or file lists to the control plane securely.Install the agent
Deploy the agent package on a host that has low-latency access to the share. Prefer a server in the same site as the storage rather than a laptop that sleeps.
Register and authenticate
Enroll the agent with a workspace key, OAuth device flow, or mutual TLS as your enterprise standard requires. Rotate enrollment secrets on the same schedule as other service credentials.
Configure watched paths
Map local or UNC paths (
\\fileserver\landing\) to logical watch roots. Apply the same include/exclude patterns as polling mode.After files are detected
Configure the trigger to pass file paths or connection-relative URIs into pipeline parameters. Add a post-success archive or delete step only when your operations team owns retention; otherwise leave source files in place and rely on idempotent loads for replays.If the same file remains in the watched folder across polls, decide whether reprocessing is allowed. Some teams move processed files to
archive/ so only new drops trigger runs.Related topics
Triggers overview
Event triggers and webhooks compared to file watching.
Orchestration overview
How schedules, triggers, and chaining fit together.