Email Data Feed - Scheduling the Python script using Task Scheduler
search cancel

Email Data Feed - Scheduling the Python script using Task Scheduler

book

Article ID: 172981

calendar_today

Updated On:

Products

Email Security.cloud Email Threat Detection and Response

Issue/Introduction

This article describes how to schedule a Python script using Task Scheduler to run at specified times. 

Environment

Email Threat Detection and Response

Resolution

Ensure you have the NdfConfig.json configured for the call wanted (test / all / malware / isolation) and the absolute path created for the cookies and logs. 
 

NdfConfig


To schedule different calls for different jobs, create separate files for scripts & json files for all or malware. Example: allNdfConfig.json & allNdfScript.py; malwareNdfConfig.json & malwareNdfConfig.json

NdfScript.py – the call in the script for the NdfConfig.json should have the absolute path. Edit the Python script "NdfScript.py" to include the absolute path for the script configuration file "NdfConfig.json" 

Python Config

Scheduling Task:
Open the Task scheduler and create basic Task:

Create Task


Create Trigger:

Edit Trigger

Create Action:
Key point is to start the python program using the arguments for the absolute path to the script file you want to call – use quotes. If doing different scripts for all and malware you need a different task for each one.

Edit Action