I have a script that reads a list of IPs from a file, compares with the existing ones in a chain, and adds recently added IPs in the file into that chain. Running the script manually (e.g., ./script) with both root and non-root accounts, returns the expected output. However, running the script in cron has an unexpected behaviour: the already existing IPs in the chain are duplicated. Here is the cron for the script:* * * * * root /usr/bin/python /home/user/scriptChanging the user from root to a non-root user does not even execute the script. Does anyone know why this happens?
Strange cron behaviour
linux;iptables;cron