定时 [英] TIming

查看:66
本文介绍了定时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



HI,

我正在尝试编写一个程序来运行

scedule上的程序。我无法理解日期时间,时间,sched

模块。我想要的是这样的:


如果日期&时间= 06-13-2006:18:00:00

那么运行这个程序


我不知道如何使用上述模块的任​​何

输入此等式中的未来日期。我已经想出如何从上面的模块中获取日期

和时间而不是未来然后比较

这两个。


任何帮助表示赞赏。


谢谢

解决方案

WIdgeteye< No * *@none.none>写道:

HI,
我正在尝试编写一个程序来运行
scedule上的程序。我无法理解日期时间,时间,计划模块。我想要的是这样的:

如果日期&时间= 06-13-2006:18:00:00
然后运行这个程序

我我不知道如何使用上面提到的任何模块在这个等式中输入未来的日期。我已经想出如何从上面的模块获取日期
和时间,但不是未来,然后比较两个。




什么您使用的是操作系统吗? Linux和Windows都有命令

可以为你做这件事。使用现有的操作系​​统服务比发明自己的系统服务更有效。


另外,请记住考虑你的程序的可能性可能

没有检查确切秒的时间。在你的例子中,如果时间是6月13日下午6点,你需要准备好启动你的应用程序。

-

- Tim Roberts, ti**@probo.com

Providenza& Boekelheide,Inc。


On Tue,2006年5月30日04:34:03 +0000,Tim Roberts写道:

WIdgeteye <否** @ none.none>写道:

HI,
我正在尝试编写一个程序来运行程序。
我无法理解日期时间,时间,计划模块。我想要的是这样的:

如果日期&时间= 06-13-2006:18:00:00
那么运行这个程序
<我不知道如何使用上面提到的任何模块在这个等式中输入未来的日期。我已经想出如何从上面的模块中获取日期和时间,而不是将来,然后比较两者。



您使用的是什么操作系统? Linux和Windows都有可以为您执行此操作的命令。使用现有的操作系​​统服务比创建自己的系统服务更有效。

另外,请记住考虑到您的程序可能无法检查的可能性。准确秒钟的时间。在您的示例中,如果时间是6月13日下午6点,您需要准备启动应用程序。




我正在使用Linux和可以用cron。但是我希望能够在她身上安排和录制电视节目。是的,我知道

freevo但它的复杂程度超出了它的需要。


回到问题:我怎样才能得到来自

的9位元组,基于未来日期在Python中运行时间。


谢谢。


星期二,2006-05-30 00:23 -0500,WIdgeteye写道:

On Tue,2006年5月30日04:34:03 +0000,Tim Roberts写道:

WIdgeteye< No ** @ none.none>写道:

HI,
我正在尝试编写一个程序来运行程序。
我无法理解日期时间,时间,计划模块。我想要的是这样的:

如果日期&时间= 06-13-2006:18:00:00
那么运行这个程序
<我不知道如何使用上面提到的任何模块在这个等式中输入未来的日期。我已经想出如何从上面的模块中获取日期和时间,而不是将来,然后比较两者。



您使用的是什么操作系统? Linux和Windows都有可以为您执行此操作的命令。使用现有的操作系​​统服务比创建自己的系统服务更有效。

另外,请记住考虑到您的程序可能无法检查的可能性。准确秒钟的时间。在您的示例中,如果时间是6月13日下午6点,您需要准备启动应用程序。



我正在使用Linux并且可以使用cron。但我希望能够安排和录制她的电视节目。是的,我知道
freevo,但这是复杂的方式而不是它需要的。

回到问题:如何从
基于未来日期在Python中的时间函数。




Tim Roberts是对的。当你在Linux上时,我建议你调查

命令 - 非常用户友好,而且一点都不复杂。



-

此邮件已被MailScanner扫描病毒和

危险内容,并且

被认为是干净的。



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

解决方案

WIdgeteye <No**@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.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.


On Tue, 30 May 2006 04:34:03 +0000, Tim Roberts wrote:

WIdgeteye <No**@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.



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.


Tue, 2006-05-30 at 00:23 -0500, WIdgeteye wrote:

On Tue, 30 May 2006 04:34:03 +0000, Tim Roberts wrote:

WIdgeteye <No**@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.



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.



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.


这篇关于定时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆