By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,660 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,660 IT Pros & Developers. It's quick & easy.

running a perl script on startup

P: 63
Hi,
I'm running Ubuntu 7.04.
I Have a perl script. I want it to be running all the time. The way it is working, I must start my script, so when someone turns off the computer it doesn't run anymore.
I'd like it to start running when the computer boots.
I read something about it in the web and I tried to add the script to /etc/init.d but didn't work.
I need this to run in the shell.
Can someone help me?

TIA,

Joćo
Oct 24 '07 #1
Share this Question
Share on Google+
2 Replies

numberwhun
Expert Mod 2.5K+
P: 3,503
Hi,
I'm running Ubuntu 7.04.
I Have a perl script. I want it to be running all the time. The way it is working, I must start my script, so when someone turns off the computer it doesn't run anymore.
I'd like it to start running when the computer boots.
I read something about it in the web and I tried to add the script to /etc/init.d but didn't work.
I need this to run in the shell.
Can someone help me?

TIA,

Joćo
What about setting up a cron job to run it all the time?

Regards,

Jeff
Oct 24 '07 #2

P: 63
thansk for your tip jeff, but I have other solution that works for now.

I'll write it here, maybe could help someone else.

Go to System > preferences >sessions;
In the first folder ("boot applications" or something similar, I have my ubuntu in portuguese :-) ) add a new one with the command line:
xterm -e perl 'myscript' (with no ''')

this will open a xterm window and lauch the perl script 'my script' on boot


hugs,

Joćo
Oct 25 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.