running cron jobs in ubuntu

durga ch

durga ch

@durga-TpX3gO Oct 16, 2024
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?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • macbraughton

    macbraughton

    @macbraughton-OD8j18 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:

    <a href="https://help.ubuntu.com/community/RootSudo" target="_blank" rel="nofollow noopener noreferrer">RootSudo - Community Help Wiki</a>

    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]<program name>[/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

    @durga-TpX3gO Feb 8, 2009

    hey thanks for that info!
    it was useful.

    will try running tonight again!
  • macbraughton

    macbraughton

    @macbraughton-OD8j18 Feb 8, 2009

    No problem. Hope that helps.