# crontab -e not starting script

**URL:** https://dietpi.com/forum/t/crontab-e-not-starting-script/6270
**Category:** General Discussion
**Created:** [3 February 2022 12:51 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270 "2022-02-03T12:51:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![hastrup](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@hastrup](https://dietpi.com/forum/u/hastrup)
#### Post date: [3 February 2022 12:51 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/1 "2022-02-03T12:51:24Z")

</div>

hey i have looking in the forum old answers for cron but cant for the life of get this working. i have done exactly same thing on my x64 machine line by line and it is working there.

i have a program i want to start on boot its in /home/dietpi/ccminer/ my script is call mine.sh  
And it works  
it start minening when i do ./mine.sh

then i go crontab -e put the line

@reboot /home/dietpi/ccminer/mine.sh

save and exit

but when i reboot nothing start

do you have some ideas?

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [3 February 2022 20:07 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/2 "2022-02-03T20:07:39Z")

</div>

what is the user you are using to run crontab -e? is it root user? or something else?

---

<div class="post-metadata">

### Author: ![hastrup](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@hastrup](https://dietpi.com/forum/u/hastrup)
#### Post date: [3 February 2022 21:29 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/3 "2022-02-03T21:29:55Z")

</div>

the user is both root and dietpi i tried both

---

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [3 February 2022 21:59 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/4 "2022-02-03T21:59:11Z")

</div>

Can you show your crontab and the content of the script mine.sh?

---

<div class="post-metadata">

### Author: ![hastrup](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@hastrup](https://dietpi.com/forum/u/hastrup)
#### Post date: [4 February 2022 06:55 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/5 "2022-02-04T06:55:59Z")

</div>

yes ofc

[https://imgur.com/a/p2ejOVL](https://imgur.com/a/p2ejOVL)

---

<div class="post-metadata">

### Author: ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)
#### Post date: [4 February 2022 09:14 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/6 "2022-02-04T09:14:13Z")

</div>

So I counted the lines in your crontab 😃 It read 25 lines but your last line is your entry.  
Crontab needs that each entry ends with a newline character.  
Go to the end of your entry, hit Return and save and try again.

---

<div class="post-metadata">

### Author: ![hastrup](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@hastrup](https://dietpi.com/forum/u/hastrup)
#### Post date: [4 February 2022 15:04 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/7 "2022-02-04T15:04:46Z")

</div>

im sorry that that did not work

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [4 February 2022 16:07 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/8 "2022-02-04T16:07:22Z")

</div>

A couple of things, there is no [shebang](https://stackoverflow.com/questions/25165808/should-i-use-a-shebang-with-bash-scripts) on the header of the script, and when you create scripts you should either use the full path or specify the PATH environmental variable.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [4 February 2022 18:23 UTC](https://dietpi.com/forum/t/crontab-e-not-starting-script/6270/9 "2022-02-04T18:23:59Z")

</div>

correct, the program ccminer to be called with full path from inside the script
