Scheduling a program/function execution?

This is a discussion on Scheduling a program/function execution? within the Linux Programming forums, part of the Platform Specific Boards category; Hey, I'm somewhat new to the GNU world, but I was wondering if it were possible to schedule a function. ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    1

    Scheduling a program/function execution?

    Hey, I'm somewhat new to the GNU world, but I was wondering if it were possible to schedule a function. Basically, if I wanted Function A to run between the hours of 8 AM and 8 PM on such and such a day, and Function B to run between 8 PM and 12 AM, and Function C to run between 12 AM and 8AM, what would I do?

    Under Windows, I know there was a scheduling API. Is there a similar thing for Linux?

    Thanks.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    man crontab

    crontab is the program you use to edit the files which control the cron process, which is used to make things happen at regular intervals.

    Eg.
    00 */4 * * * /home/me/jobs
    makes 'jobs' run every 4 hours.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Execution Time - Rijandael encryption
    By gamer4life687 in forum C++ Programming
    Replies: 5
    Last Post: 09-20-2008, 09:25 PM
  2. Replies: 0
    Last Post: 10-06-2007, 01:25 PM
  3. Arbitrary Code Execution
    By CrazyNorman in forum C++ Programming
    Replies: 3
    Last Post: 04-10-2007, 02:33 PM
  4. What is the best way to record a process execution time?
    By hanash in forum Linux Programming
    Replies: 7
    Last Post: 03-15-2006, 06:17 AM
  5. Round Robin Scheduling using c.
    By eclipt in forum C Programming
    Replies: 8
    Last Post: 12-28-2005, 03:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21