Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 563  / 2 Years ago, thu, march 31, 2022, 12:54:54

I want to create a cron job which will run every 5 minutes. I have understood the concept of setting the condition of 'every five minutes' from a previous answer on the same topic. However, i do not understand the part where it says /path/to command. i have the format for every 5 minutes as */5 * * * * and i have set root as the user. The job i want to be have run every 5 minutes is executed by the following command



snmpbulkwalk -v 2c -c public -OXsq  172.16.1.210 
.1.3.6.1.2.1.3.1.1.2 > /tmp/S01_ARP.txt


How can i add this cron job properly


More From » cron

 Answers
7

The /path/to/command is the the path to the bin file of your command snmpbulkwalk. When you run snmpbulkwalk, you're actually running its binary file which is located probably in /bin or /usr/bin. To find out what this path is, run which snmpbulkwalk. Let's say this returns /usr/bin/snmpbulkwalk. Therefore, your cronjob would be:



*/5 * * * * /usr/bin/snmpbulkwalk -v 2c -c public -OXsq  172.16.1.210 .1.3.6.1.2.1.3.1.1.2 > /tmp/S01_ARP.txt

[#29849] Thursday, March 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sator

Total Points: 258
Total Questions: 119
Total Answers: 101

Location: Sweden
Member since Fri, Apr 16, 2021
3 Years ago
;