I want to run upstart job. I've created upstart file and put it to /etc/init
folder
#/etc/init/myjob.conf
description "test job"
start on runlevel [2345]
exec /home/megas/test.sh
and then created script in home directory
#/home/megas/test.sh
#!/bin/sh
echo "test job, reporting..."
Then I'm trying to run
sudo start myjob
but got message
start: Job failed to start
What I'm doing wrong? How to create upstart job?
I did some testing on
lubuntu 12.04
and the problem is due to wrong permission oftest.sh
, so try:When you start the job:
This is normal behavior for task job and
echo
output is stored in:According to upstart manual: