CrazyEngineers
  • running cron jobs in ubuntu

    durga ch

    Member

    Updated: Oct 16, 2024
    Views: 2.0K
    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?
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • macbraughton

    MemberFeb 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!
    Are you sure? This action cannot be undone.
    Cancel
  • durga ch

    MemberFeb 8, 2009

    hey thanks for that info!
    it was useful.

    will try running tonight again!
    Are you sure? This action cannot be undone.
    Cancel
  • macbraughton

    MemberFeb 8, 2009

    No problem. Hope that helps.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register