Cron doesn't know to look at your proxyban.cron file. You need to put this info into a crontab. First, make sure the EDITOR and VISUAL environment variables specify your preferred editor*, e.g.:
Code:
# export EDITOR=nano
# export VISUAL=nano
Then edit your crontab by running
crontab -e - this will start up your editor. Type in the line that you saved in proxyban.cron. Save the file and exit the editor.
You can use
crontab -l (that's a lowercase L) to see the current contents of your crontab. You will probably have to use
chmod a+x /root/scripts/proxyban to make your script executable (I can't remember if cron cares about this or not).
To make sure the job is running, you can check the log file /var/log/cron.log. This will show all jobs that have been run but not the output of your cron jobs. To capture the results of the cron job, you need to redirect its output somewhere, for example with a crontab line like:
Code:
0 */2 * * * /root/scripts/proxyban >> /path/to/log/file 2>&1
I would recommend adding a
date command to the beginning of your script, otherwise you'll have no idea which run the output belongs to.
*You don't
have to do this, but if you don't, there's a good chance you'll end up getting
vi to edit your crontab. Not that there's anything wrong with that.