I have set up a cronjob on my server which is supposed to run every minute and store the output in the given file. I have been trying a lot and saw a lot of links but nothing seems to work. Following is the line which I wrote in crontab -e
* * * * * /root/snmp_codes/snmp/.\/snmpstats.py -f file -g > logfile.log
Can anyone please tell me what mistake I have made?
\/
doing in the middle of the command? You should probably have either/root/snmp_codes/snmp/.snmpstats.py
or/root/snmp_codes/snmp/snmpstats.py
chmod 775 snmpstats.py
and while running the script normally I run it as./snmpstats.py -f file -g
. I used `\` as an escape sequence.