300-435 exam dumps

300-435 practice question 109 of 322

Automating Cisco Enterprise Solutions. Professional level, Cisco. Free question with the correct answer and a full explanation.

300-435 Question 109

Single answer

A network engineer is implementing a Python script to collect interface statistics from a Cisco device using RESTCONF. The engineer wants this script to execute automatically every 15 minutes to ensure up-to-date data is available for reporting. Which approach should the engineer use to achieve this periodic execution?

  1. A

    Use a job scheduler like cron to execute the script every 15 minutes

  2. B

    Configure an EEM (Embedded Event Manager) policy on the Cisco device to trigger the Python script

  3. C

    Use a RESTCONF subscription to automatically execute the script at a 15-minute interval

  4. D

    Implement a loop within the script that runs every 15 minutes using a sleep timer

Show answer and explanation

Correct answer: A

Explanation

To achieve periodic execution of a script, using an external job scheduler like cron is the most efficient and practical solution. It allows the script to run at defined intervals without keeping the script continuously active, which would be resource-intensive. Other options, such as EEM or RESTCONF subscriptions, are not suitable for this specific use case.

  • A. Correct.

    This is the correct approach. A job scheduler like cron is an external tool designed for periodic task execution and is commonly used for automating script execution at regular intervals.

  • B. Incorrect.

    While EEM can trigger scripts based on specific events, it is not designed for periodic execution of external Python scripts like the one described in the scenario.

  • C. Incorrect.

    RESTCONF subscriptions are used for event-driven notifications from the device to an external system. They do not provide a mechanism for periodic execution of external scripts.

  • D. Incorrect.

    While a sleep timer within the script could achieve periodic execution, it is not a best practice as it would keep the script running continuously, potentially consuming unnecessary resources.

Timed practice exam

Take a 300-435 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam