-2

I am trying to run a shell script from Cron at reboot. The script is located in /var/gee. The script is named _startTest.sh. This is the command I have used in cron is: cd /var/gee && ./_startTest.sh

The script doesn't run. Any ideas what I am doing wrong here?

Sascha
  • 398
  • 6
  • 14
  • Why in cron and not in /etc/init.d etc – Ed Heal Jul 11 '15 at 13:04
  • So what happens when you run that command manually on a command line ? And when have you specified that the command should run ? (Cron doesn't have a vocabulary to run things at boot ) Note that you're also missing a space between cd and /var/gee – nos Jul 11 '15 at 13:05
  • Thanks I added the space- still not working: cmd line output is: ./_startTest.sh: No such file or directory – Sascha Jul 11 '15 at 13:07
  • @reboot /var/gee/_startTest.sh – DmitryK Jul 11 '15 at 13:10

1 Answers1

0

Thanks for your responses. I found the answer to the problem. The job was set to run at Reboot. I was testing it by executing it via the scheduler. I erroneously thought this would start the job at that moment.

Sascha
  • 398
  • 6
  • 14