TIming

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WIdgeteye

    #1

    TIming


    HI,
    I am trying to write a little program that will run a program on
    scedule. I am having trouble understanding the datetime, time, sched
    modules. What I would like is something like this:

    If date&time = 06-13-2006:18:00:00
    Then run this program

    I am not sure how to enter a future date in this equation using any
    of the modules mentioned above. I have figured out how to get the date
    and time from the modules above but not the future and then compare
    the two.

    Any help appreciated.

    Thanks

  • Tim Roberts

    #2
    Re: TIming

    WIdgeteye <None@none.none > wrote:[color=blue]
    >HI,
    >I am trying to write a little program that will run a program on
    >scedule. I am having trouble understanding the datetime, time, sched
    >modules. What I would like is something like this:
    >
    >If date&time = 06-13-2006:18:00:00
    >Then run this program
    >
    >I am not sure how to enter a future date in this equation using any
    >of the modules mentioned above. I have figured out how to get the date
    >and time from the modules above but not the future and then compare
    >the two.[/color]

    What operating system are you using? Both Linux and Windows have commands
    that can do this for you. It's more efficient to use existing operating
    system services than to invent your own.

    Also, remember to take into account the possibility that your program might
    not check the time at the exact second. In your example, you need to be
    prepared to start your app if the time is just PAST 6 PM on June 13.
    --
    - Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    • WIdgeteye

      #3
      Re: TIming

      On Tue, 30 May 2006 04:34:03 +0000, Tim Roberts wrote:
      [color=blue]
      > WIdgeteye <None@none.none > wrote:[color=green]
      >>HI,
      >>I am trying to write a little program that will run a program on scedule.
      >>I am having trouble understanding the datetime, time, sched modules. What
      >>I would like is something like this:
      >>
      >>If date&time = 06-13-2006:18:00:00
      >>Then run this program
      >>
      >>I am not sure how to enter a future date in this equation using any of
      >>the modules mentioned above. I have figured out how to get the date and
      >>time from the modules above but not the future and then compare the two.[/color]
      >
      > What operating system are you using? Both Linux and Windows have commands
      > that can do this for you. It's more efficient to use existing operating
      > system services than to invent your own.
      >
      > Also, remember to take into account the possibility that your program
      > might not check the time at the exact second. In your example, you need
      > to be prepared to start your app if the time is just PAST 6 PM on June 13.[/color]

      I am using Linux and could use cron. But I want to be able to
      schedule and record television shows on her. And yeah I know about
      freevo but it's way to complicated than it needs to be.

      So back to the question: How can I get a 9 position tuple from
      the time functions in Python based on a future date.

      Thanks.

      Comment

      • John McMonagle

        #4
        Re: TIming

        Tue, 2006-05-30 at 00:23 -0500, WIdgeteye wrote:[color=blue]
        > On Tue, 30 May 2006 04:34:03 +0000, Tim Roberts wrote:
        >[color=green]
        > > WIdgeteye <None@none.none > wrote:[color=darkred]
        > >>HI,
        > >>I am trying to write a little program that will run a program on scedule.
        > >>I am having trouble understanding the datetime, time, sched modules. What
        > >>I would like is something like this:
        > >>
        > >>If date&time = 06-13-2006:18:00:00
        > >>Then run this program
        > >>
        > >>I am not sure how to enter a future date in this equation using any of
        > >>the modules mentioned above. I have figured out how to get the date and
        > >>time from the modules above but not the future and then compare the two.[/color]
        > >
        > > What operating system are you using? Both Linux and Windows have commands
        > > that can do this for you. It's more efficient to use existing operating
        > > system services than to invent your own.
        > >
        > > Also, remember to take into account the possibility that your program
        > > might not check the time at the exact second. In your example, you need
        > > to be prepared to start your app if the time is just PAST 6 PM on June 13.[/color]
        >
        > I am using Linux and could use cron. But I want to be able to
        > schedule and record television shows on her. And yeah I know about
        > freevo but it's way to complicated than it needs to be.
        >
        > So back to the question: How can I get a 9 position tuple from
        > the time functions in Python based on a future date.[/color]

        Tim Roberts is right. As you are on linux, I suggest you investigate
        the at command - very user friendly and not at all complicated.






        --
        This message has been scanned for viruses and
        dangerous content by MailScanner, and is
        believed to be clean.

        Comment

        • bruno at modulix

          #5
          Re: TIming

          WIdgeteye wrote:[color=blue]
          > HI,
          > I am trying to write a little program that will run a program on
          > scedule.[/color]

          <ot>
          There are usually existing programs to do so on most platforms (cron on
          *n*x, the Windows scheduler, etc).
          </ot>

          --
          bruno desthuilliers
          python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
          p in 'onurb@xiludom. gro'.split('@')])"

          Comment

          • WIdgeteye

            #6
            Re: TIming

            On Tue, 30 May 2006 16:15:44 +1000, John McMonagle wrote:
            [color=blue]
            > Tue, 2006-05-30 at 00:23 -0500, WIdgeteye wrote:[color=green]
            >> On Tue, 30 May 2006 04:34:03 +0000, Tim Roberts wrote:
            >>[color=darkred]
            >> > WIdgeteye <None@none.none > wrote:
            >> >>HI,
            >> >>I am trying to write a little program that will run a program on
            >> >>scedule. I am having trouble understanding the datetime, time, sched
            >> >>modules. What I would like is something like this:
            >> >>
            >> >>If date&time = 06-13-2006:18:00:00
            >> >>Then run this program
            >> >>
            >> >>I am not sure how to enter a future date in this equation using any of
            >> >>the modules mentioned above. I have figured out how to get the date
            >> >>and time from the modules above but not the future and then compare
            >> >>the two.
            >> >
            >> > What operating system are you using? Both Linux and Windows have
            >> > commands that can do this for you. It's more efficient to use
            >> > existing operating system services than to invent your own.
            >> >
            >> > Also, remember to take into account the possibility that your program
            >> > might not check the time at the exact second. In your example, you
            >> > need to be prepared to start your app if the time is just PAST 6 PM on
            >> > June 13.[/color]
            >>
            >> I am using Linux and could use cron. But I want to be able to schedule
            >> and record television shows on her. And yeah I know about freevo but
            >> it's way to complicated than it needs to be.
            >>
            >> So back to the question: How can I get a 9 position tuple from the time
            >> functions in Python based on a future date.[/color]
            >
            > Tim Roberts is right. As you are on linux, I suggest you investigate the
            > at command - very user friendly and not at all complicated.[/color]


            I have been using Slackware for over 10 years I know all about the
            commands on the OS.
            If you guys don't have an answer to the question just say so. But don't
            give me suggestions on how to use an OS I have been using most likely
            longer than 90% of the people using linux today.

            This is the comp.lang.pytho n news group not the linux news group. If I
            didn't want to write the Python code and I wanted to use the OS commands
            instead I would.

            Python is cross platform. Linux is not. I intend to release the software
            to the general public someday when it is done. I want it cross platform.

            BTW in the time it took me NOT to get an answer for my question in this so
            called Python NG, I figured it out for myself.

            This PYTHON NG blows to high heaven. Whats worse, the answers I got were
            most likely from people who know SQUAT about Python scripting. That's why
            they gave me such lame fucking answers.

            Idiots.

            Comment

            • Scott David Daniels

              #7
              Re: TIming

              WIdgeteye wrote:[color=blue]
              > <Osome rude drivel>[/color]
              Thank you very much for your participation.

              --Scott David Daniels
              scott.daniels@a cm.org

              Comment

              • jack2004fb@126.com

                #8
                Re: TIming

                You can try this EnergyKey

                This may be help you.
                Now I always use EnergyKey, it helps me so much in my work.

                Comment

                • John Machin

                  #9
                  Re: TIming

                  On 31/05/2006 5:50 AM, WIdgeteye wrote:
                  [color=blue]
                  >
                  > This PYTHON NG blows to high heaven. Whats worse, the answers I got were
                  > most likely from people who know SQUAT about Python scripting. That's why
                  > they gave me such lame [expletive deleted] answers.
                  >
                  > Idiots.[/color]

                  Kindly refer back to your post of almost two years ago:



                  """Arg! That was it, now I really feel stupid. """


                  Comment

                  • John Bokma

                    #10
                    Re: TIming

                    WIdgeteye <None@none.none > wrote:
                    [color=blue]
                    > BTW in the time it took me NOT to get an answer for my question in
                    > this so called Python NG, I figured it out for myself.[/color]

                    Maybe you want to post the solution in order to help others with similar
                    problems in the future?

                    --
                    John MexIT: http://johnbokma.com/mexit/
                    personal page: http://johnbokma.com/
                    Experienced programmer available: http://castleamber.com/
                    Happy Customers: http://castleamber.com/testimonials.html

                    Comment

                    • Tim Roberts

                      #11
                      Re: TIming

                      WIdgeteye <None@none.none > wrote:
                      [color=blue]
                      >On Tue, 30 May 2006 16:15:44 +1000, John McMonagle wrote:
                      >[color=green]
                      >> Tim Roberts is right. As you are on linux, I suggest you investigate the
                      >> at command - very user friendly and not at all complicated.[/color]
                      >
                      >I have been using Slackware for over 10 years I know all about the
                      >commands on the OS.
                      >
                      >If you guys don't have an answer to the question just say so. But don't
                      >give me suggestions on how to use an OS I have been using most likely
                      >longer than 90% of the people using linux today.
                      >
                      >This is the comp.lang.pytho n news group not the linux news group. If I
                      >didn't want to write the Python code and I wanted to use the OS commands
                      >instead I would.[/color]

                      Utter nonsense. If someone posted on comp.lang.pytho n that they wanted to
                      know how to write a DMA-based PCI driver in Python, I am sure as heck going
                      to tell them that there are better tools for the job and better newsgroups
                      for the question.
                      [color=blue]
                      >Python is cross platform. Linux is not. I intend to release the software
                      >to the general public someday when it is done. I want it cross platform.[/color]

                      Windows also has an "at" command.

                      However, you are not going to be able to write a television-based
                      application that is cross platform. The video tools are just too
                      different.
                      [color=blue]
                      >BTW in the time it took me NOT to get an answer for my question in this so
                      >called Python NG, I figured it out for myself.[/color]

                      That's almost always the case with newsgroups. They are NOT a real-time
                      medium.
                      [color=blue]
                      >This PYTHON NG blows to high heaven. Whats worse, the answers I got were
                      >most likely from people who know SQUAT about Python scripting. That's why
                      >they gave me such lame fucking answers.[/color]

                      We did not give you "lame fucking answers". We gave you solutions to the
                      problem you posed. If the problem statement wasn't clear enough, that
                      isn't our fault.
                      [color=blue]
                      >Idiots.[/color]

                      It takes one to know one.
                      --
                      - Tim Roberts, timr@probo.com
                      Providenza & Boekelheide, Inc.

                      Comment

                      Working...