How to run cron job every 2 hours? [closed]

Question

How can I write a Crontab that will run my /home/username/test.sh script every 2 hours?

Answer

Just do:

0 */2 * * *  /home/username/test.sh 

The 0 at the beginning means to run at the 0th minute. (If it were an *, the script would run every minute during every second hour.)

Don't forget, you can check syslog to see if it ever actually ran!

How to place the ~/.composer/vendor/bin directory in your PATH?

How to set ANDROID_HOME path in ubuntu?