-1

I want to run a cron for every 1 hour.

What i tried :

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

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

But, i am not sure, which one is right ? Can you please help me to decide . which one i should use?

s4suryapal
  • 1,880
  • 1
  • 18
  • 26
  • 4
    Possible duplicate of [How to set up a cron job to run an executable every hour?](http://stackoverflow.com/questions/3474280/how-to-set-up-a-cron-job-to-run-an-executable-every-hour) – kayess Jun 13 '16 at 07:17

2 Answers2

0

This is the way to set cronjob on ubuntu for every 1 hour
0 * * * * or you can put it in cron.hourly directory
For more details you can refer link:
https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job

Community
  • 1
  • 1
priyanka
  • 36
  • 6
-2
    # Use the hash sign to prefix a comment
    # +---------------- minute (0 - 59)
    # |  +------------- hour (0 - 23)
    # |  |  +---------- day of month (1 - 31)
    # |  |  |  +------- month (1 - 12)
    # |  |  |  |  +---- day of week (0 - 7) (Sunday=0 or 7)
    # |  |  |  |  |
    # *  *  *  *  *  command to be executed
    #--------------------------------------------------------------------------
    * */1 * * *  root /bin/sh /home/username/test.sh
snex
  • 982
  • 11
  • 21
  • 2
    If you know that there are _hundreds_ of dupe targets, why do answer the question instead of flagging it as being duplicate?? – kayess Jun 13 '16 at 07:16