getting error when trying to use 'at' module to schedule a script

I tried to schdule a script to be run at a particular time as per the instruction in documentation for ‘at’ module. However iam getting below error. Not sure what iam doing wrong, please guide.

First, i wrote a script which references another script that need to be executed in 5 minutes. Both scripts are in same directory. However when i run this script, it shows below error:

i wonder if ‘hosts: TESTFIREWALL’ is needed as iam not running this script on a remote host but i tried adding and removing it yet got error on both occassions.

Is at installed on your hosts?

https://docs.ansible.com/ansible/2.5/modules/at_module.html#requirements

It seems environment issue. Find the ‘at’ command location and export to the binary path.

Hi Erik,

no, i wanted to schedule a script to be run on a cisco switch/firewall (network device). i don’t think ‘at’ module can be installed on a network device.

so is there any other way i can schedule script to be run in device in below format?

2960 switch-1 - run 2960upgrade.yaml - run at 2:30 pm

3650 switch - 3650upgrade.yaml - run at 3:30 pm

2960 switch-2 - 2960upgrade.yaml - run at 4:30 pm

Thanks,
Vikram

Check kron module, it’s similar to at.

Hi,

After going tghrough documentation for cron module, i doubt if it would help in scheduling script to be executed in network devices. Are you sure it helps with scheduling for scisco network devices?

Regards,
Vikram

We cannot execute any script on network devices, execution will happen only in the Ansible server . The cron job will only do the scheduling job.