View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12920 Members
Join this group to post and comment.
durga ch
durga ch • Feb 8, 2009

running cron jobs in ubuntu

I am currently using ubuntu 8.10 .
I was trying to play around with cron deamons but realised that in ubuntu I am not the root.
i dont have previleges to run crons nor to set up one.

How are cron jobs set up in that case?

I tried stopping the cron deamon by running sh cron stop at cd /etc/inti.d
and the follwoing error pops up
* Stopping periodic command scheduler crond start-stop-daemon: warning: failed to kill 5563: Operation not permitted
[fail]
vijayadurga@ubuntu:/etc/init.d$

thought I woudl run it from vijayadurga@ubuntu:/etc/rc5.d$ and script S89cron, but I think this is only for start up or this files links to the cron file and I can perform both start and stop?
macbraughton
macbraughton • Feb 8, 2009
The root account is locked in Ubuntu. You have to use the command sudo to get superuser priviledges. You can find a detailed explanation here:

https://help.ubuntu.com/community/RootSudo

I believe the command you're looking for is:

sudo /etc/init.d/cron stop
and to restart it:

sudo /etc/init.d/cron start
A lot of information about the various programs installed in your ubunutu system can be found by typing:

man [I][/I]
And also by typing in the argument --help after the program name. For example, typing:

sudo /etc/init.d/cron --help
will give the output:

* Usage: /etc/init.d/cron {start|stop|restart|reload|force-reload|status}
But you only need to use sudo if the program is only accessible for the root user.

Another great command for learning more about how the programs on your system work is info.

Try these commands and read the output to learn more about the information already on your system:

man man
man --help
info man
Good luck!
durga ch
durga ch • Feb 8, 2009
hey thanks for that info!
it was useful.

will try running tonight again!
macbraughton
macbraughton • Feb 8, 2009
No problem. Hope that helps.

Share this content on your social channels -