0

Here is the script for every 30 min

00,30 * * * * [path_to_file]/myscript.sh

Whats is the script to run the same with each reboot

@reboot 00,30 * * * * [path_to_file]/myscript.sh

Is the above line right?

1 Answer 1

2

no. These are two separate rules.

man 5 crontab
       Instead  of  the  first  five  fields, one of eight special strings may
       appear:

              string         meaning
              ------         -------
              @reboot        Run once, at startup.
4
  • so how do I go about doing that?
    – johnrao07
    Commented Sep 13, 2016 at 11:56
  • with two separate lines Commented Sep 13, 2016 at 11:59
  • ok It's still blurry for me. adding both lines in the cron config file , that is all in it ryt?
    – johnrao07
    Commented Sep 13, 2016 at 17:34
  • or it goes like this, one script file with 30 mins interval code and launch that file every reboot.
    – johnrao07
    Commented Sep 13, 2016 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .