cron on bsd and how do i use it

Discussion in 'Linux & BSD' started by Dark Atheist, Jul 18, 2008.

  1. Dark Atheist

    Dark Atheist Moderator Political User Folding Team

    Messages:
    6,376
    Location:
    In The Void
    as topic states - i know where it is as i have just found it :) but unlike linux its not overly clear on how i use it for a per user setting, the crontab in /etc looks to be for root only, but what if i want to use another user to run something? can i or do i place it in that file and just change the name under the who coloum?
     
  2. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    man crontab

    Code:
    crontab -e -u <user> # Works only when root
    crontab -e # Works as the user you want to set up a crontab for
    Do not edit the crontab files by hand.
     
  3. Dark Atheist

    Dark Atheist Moderator Political User Folding Team

    Messages:
    6,376
    Location:
    In The Void
    i forgot about that -e switch - doh, and also forgot to install the man pages when i installed bsd :s - they are in there now though :)
     
  4. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    the /etc/crontab file is also a nice source for the format of a cronjob. /etc/crontab though is for system scheduling and not user account scheduling