Assuming that your scripts all execute properly when run manually from the command line, this should get things moving forward:
You will need two separate
crontab entries for what you want to do.
- To start at
reboot, try this:
@reboot ( /bin/sleep 30; /bin/bash /home/pi/git/vthoang/cgminer/x1R606b.sh >> /home/pi/cronjoblog 2>&1)
- To start a script at 12 hour intervals
0 01/12 * * * /bin/bash /home/pi/git/vthoang/cgminer/x1R606b.sh >> /home/pi/cronjoblog 2>&1
A few comments:
sleep command may be useful for jobs executed
@reboot. It will give your system's services time to get started before attempting to execute your script. If your script doesn't depend on system services to execute successfully, it probably won't hurt to use
/bin/bash assumes your script is running under
bash, and it may or may not be necessary. If you have a proper shebang in your shell script (e.g.
#!/bin/bash as the first line), it won't be needed.
You may benefit from redirecting any
stderr output from your script to a file so that you won't miss any error messages that may be generated by your script.
You mentioned starting more than one job at reboot. In the interest of simplicity, consider a separate
@reboot line for each job you want to start.
Refer to the crontab guru to help with the syntax for scheduling your jobs.
You may want to read some other Q&A here(1, 2, 3, 4) regarding the use of
cron to schedule jobs. And this recipe covers some details on the
environment under which