Find the answer to your Linux question:
Results 1 to 7 of 7
I need a script to run once a month and another script to run each day at midnight. How do I do this? The server I need to set this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Location
    San Diego, CA
    Posts
    3

    Scheduled Script Execution


    I need a script to run once a month and another script to run each day at midnight. How do I do this? The server I need to set this up on is running Fedora Core 2 or 3. Is there a way I can do it without the admin's help? Thanks in advance, - Jeff Jensen

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    It depends.

    For scheduled execution, you want to use cron. The real question here is whether cron is enabled for the users.

    To check, run:

    Code:
    crontab -l
    If it is enabled, this will print out some stuff. If it's not, it will tell you command not found or some other thing about cron not working for you.

    If it is enabled, you can find some info at:

    * Our own LinuxForums tutorial:

    http://www.linuxforums.org/tutorials...rial-4017.html

    * The Gentoo Cron Tutorial:

    http://www.gentoo.org/doc/en/cron-guide.xml

    Obviously ignore all the stuff about installing cron, but the Gentoo tutorial gives some examples and all that jazz.


    Hope that helps!

  3. #3
    Just Joined!
    Join Date
    May 2005
    Location
    San Diego, CA
    Posts
    3

    Alas, no crontab.

    Alas, I have no crontab. Thanks a bunch for your help, I'm in touch with the admin. - Jeff Jensen

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    man crontab also explains things fine.

    Jeff , out of curiosity what did crontab -l give you ?

  6. #5
    Just Joined!
    Join Date
    May 2005
    Location
    San Diego, CA
    Posts
    3
    "no crontab for jensen" - Jeff Jensen

  7. #6
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    This means that you have not created a crontab file.It does not
    mean that you cannot use the utility.Try crontab -e This
    will start some editor (probably vi) so that you can create your crontab
    file.

  8. #7
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    "man 5 crontab" will tell you what to put in your crontab file to schedule your jobs. Feel free to ask more questions when you've read it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •