0

I haven't been able to get crontab to execute any of my scripts on start-up. I want to know why it doesn't work. Below is an example of me trying to use it, and I've tried to provide as much troubleshooting information as I can.

$crontab -l
no crontab for server
$crontab -e
#I scroll down to the bottom of the file and add the line below in
@reboot /usr/bin/teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh
#I make a carriage return at the bottom of the file

I press ctrl+o to save the file (as it opened in nano), and ctrl+z to exit. I now issue "crontab -e" to check the contents is there. The file shows up, just without the changes I made to it. I even tried adding just a commented line in the crontab file & this also doesn't save. Anyway I checked the script does actually work normally.

$cd /usr/bin/teamspeak3-server_linux-amd64/
$./ts3server_minimal_runscript.sh

It then gives loads of output as it reads the script and loads the script perfectly. So I ctrl+c to quit the application, and check the permissions.

$ls -l | grep ts3server_minimal
-rwxr-xr-x 1 server server bla bla bla ts3server_minimal_runscript.sh

So everyone can execute it. I reboot anyway, and find the application doesn't start. Why?

closed as off-topic by Gilles, psusi, slm Jun 29 '15 at 0:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Gilles, psusi, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Nano shows a list of keybindings at the bottom of the window. – Gilles Jun 28 '15 at 23:00
7

You have to use Ctrl+x to exit nano and install new crontab. Ctrl+z will just stop/send to background nano without installing new crontab. See attached screenshot:

nano command bar

  • OMG I'm gonna test it. If this fixes it I will love you forever and ever! – john smith Jun 28 '15 at 21:30
  • OMG it fixed it. I swear man. I have worked so long trying to figure this problem out. I LOVE YOU! – john smith Jun 28 '15 at 21:34
  • @johnsmith Editor Edit: I added a screenshot to the answer. If you don't see the Command Ribbon at the bottom, something is seriously wrong with your nano configuration, – eyoung100 Jun 29 '15 at 1:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.