vendredi 26 décembre 2014

Stange cron behaviour


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 mannualy (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/script


Changing the user from root to a non-root user does not even execute the script. Does anyone know why this happens?



Aucun commentaire:

Enregistrer un commentaire