Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82614

Re: Is there a way to schedule my script?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <juan0christian@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.068
X-Spam-Evidence '*H*': 0.86; '*S*': 0.00; 'python,': 0.02; 'solution,': 0.09; 'subject:script': 0.09; 'python': 0.11; 'delay,': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'things.': 0.19; 'reset': 0.22; 'creating': 0.23; 'script': 0.25; 'gets': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; '(although': 0.31; 'clock': 0.31; 'doc': 0.31; 'fine,': 0.31; 'running': 0.33; 'entirely': 0.33; 'maybe': 0.34; 'problem': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'module.': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'solve': 0.60; 'john': 0.61; 'first': 0.61; 'complete': 0.62; 'kind': 0.63; 'within': 0.65; 'subject:there': 0.68; 'counts': 0.83; 'delay.': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=oMM9oLSVv/1QQaZFu1O+Ol6nSXRyvT6fdi+i4BsRedY=; b=Y3IhXBFaSrWX+Itze9BD4gyXU9oyKjfkhkCAUgj8+6+tI2Jk41/yJAiQk7fLHG7z4J x4pdJgtqRmnhvbo3OrxDTdevwh2hOFM8mrMkqd8yLEA9ym84h7yosFTWVf/nFiABKj56 GwY+KTYGASR9nV6Rm/iQ2ZIIwgJ41/9FzNwtBE4gVoHzJdAaVuTtN4kbp3dZfqfcUZYo 9DATmsSA5lcuTCISo3PQbchAe/h5sxE6Abztfo/rwd3U4W0LjCxQppP9QeRuX3xY2Yek WGO1/6ib2PHMhf1oS7hMxa5W9ZA66ByhPL9vBTPXtljdn0jSXcOcFXXZi5QwLBO/7S4x 9HhQ==
X-Received by 10.50.114.35 with SMTP id jd3mr10294219igb.31.1418848928759; Wed, 17 Dec 2014 12:42:08 -0800 (PST)
MIME-Version 1.0
References <mailman.17010.1418843457.18130.python-list@python.org> <m6sm9d$5es$1@reader1.panix.com> <mailman.17012.1418845926.18130.python-list@python.org> <m6soo5$mc3$1@reader1.panix.com>
From Juan Christian <juan0christian@gmail.com>
Date Wed, 17 Dec 2014 20:42:08 +0000
Subject Re: Is there a way to schedule my script?
To python-list@python.org
Content-Type multipart/alternative; boundary=047d7b2e0a016388cd050a6f8238
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.17017.1418849283.18130.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418849283 news.xs4all.nl 2971 [2001:888:2000:d::a6]:47295
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82614

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed Dec 17 2014 at 6:25:39 PM John Gordon <gordon@panix.com> wrote:
If you want to solve your problem entirely within Python, look at the
"scheduler" module. (Although even this isn't a complete solution, as you
still have to make sure the program is running in the first place...)


My script is running fine, Win/OSX/Linux and I don't want to ruin that
using system specific things.

I looked at sched doc and it's only for creating a delay, maybe a good
approach would be to call the sched and check if time = 11:59PM, then set
delay to 1h and when the time goes 9AM, it returns to my normal delay.

Is there any kind of time calculation in Python that counts the time like
0, 1, 2, 3... so that 0AM would be 0, and 11:59PM would be let's say
'645633332'? And everyday it gets a reset when the clock 'turns'?

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-17 19:10 +0000
  Re: Is there a way to schedule my script? John Gordon <gordon@panix.com> - 2014-12-17 19:41 +0000
    Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-17 19:51 +0000
      Re: Is there a way to schedule my script? John Gordon <gordon@panix.com> - 2014-12-17 20:23 +0000
        Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-17 20:42 +0000
        Re: Is there a way to schedule my script? Chris Angelico <rosuav@gmail.com> - 2014-12-18 08:34 +1100
        Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-17 21:47 +0000
        Re: Is there a way to schedule my script? Michael Torrie <torriem@gmail.com> - 2014-12-18 09:45 -0700
  Re: Is there a way to schedule my script? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-18 10:39 +1100
    Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-18 01:04 +0000
    Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-18 12:37 +0000
    Re: Is there a way to schedule my script? Ian Kelly <ian.g.kelly@gmail.com> - 2014-12-18 09:23 -0700
    Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-18 22:13 +0000
    Re: Is there a way to schedule my script? Chris Angelico <rosuav@gmail.com> - 2014-12-19 12:32 +1100
    Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-19 01:55 +0000
    Re: Is there a way to schedule my script? Terry Reedy <tjreedy@udel.edu> - 2014-12-19 00:58 -0500
  Re: Is there a way to schedule my script? Josh English <Joshua.R.English@gmail.com> - 2014-12-18 09:13 -0800
    Re: Is there a way to schedule my script? Juan Christian <juan0christian@gmail.com> - 2014-12-18 18:29 +0000

csiph-web