*/2 * * * * /etc/apf/ad/antidos -a >> /dev/null 2>&1
The difference for this is quite drastic actually
Running the first in your crontab will try to run the first available command. In this case, the first available command is root. Since we know root's NOT an available command, rather a user, this will bail.
The second is the appropriate command for a USER crontab.
So, when would the first be appropriate?
The first comes into play when you want to put the cron in a file (usually in /etc/cron.d, /etc/cron.daily, etc). The reason for THIS format is quite simply so that cron knows WHO to run as, allowing multiple users access to the cron command, or allowing you to run commands through cron as an admin (non root) user, if the user has access to the specific commands.
WHMCS Guru - WHMCS addons, management, support and more. WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
Linux Problems? WHMCS Issues? +1-866-546-8914 (linux-14) or @whmcsguru on twitter!
my bad.. replace "crontab -e" with "edit the file /etc/crontab" with what I posted above, else, use the method linux-tech describes. I didn't take notice to root user being specified, was a quick reply.