This article guides you through automating your Email Data Feed by scheduling a Python script using Windows Task Scheduler.
Email Security.cloud
Email Threat Detection and Response
Python is installed on your system (recommend Python 3.8+).
A working NdfConfig.json
file with properly defined feed-types (e.g., test
, all
, malware
, isolation, spam, etc
).
Absolute paths are configured in NdfConfig.json
, cookie directories, and log outputs.
To schedule different calls for various jobs, create separate files for scripts and JSON configurations for all tasks or malware. For example, use names like `allNdfConfig.json` and `allNdfScript.py` for general tasks, and `malwareNdfConfig.json` and `malwareNdfScript.py` for malware-related tasks.
In the `NdfScript.py` file, ensure that the call to the `NdfConfig.json` file includes the absolute path. Edit the Python script `NdfScript.py` to incorporate the absolute path for the corresponding configuration file, `NdfConfig.json`.
Windows → type Task Scheduler → open Task Scheduler.
Action: Create Basic Task
Trigger: Choose a schedule (daily, hourly, etc.)
Action: Start a program
Program/script: path to your Python executable (e.g., C:\Python39\python.exe
)
Add arguments:
Ensure both script and config paths are absolute and enclosed in quotes.
Finish the wizard. Repeat these steps for any additional feeds (e.g., malware).