1

I recently started running a Dashing application locally on my laptop. Rufus-scheduler handles the scheduling of the jobs that update the dashboard. I have a job scheduled to run every minute. The job spawns another process and captures the output. When I shut the lid of my laptop for a few hours, and open the lid again, I can barely use the laptop, because hundreds of processes have started up and consumed all my RAM and several gigabytes of swap. They eventually finish over the next several minutes, and I can resume using my laptop normally.

How can I configure my jobs to not be scheduled when the computer is sleeping? Or is there a better way to avoid this problem?

4

2 回答 2

1

多种解决方案。

a) 使用 rufus-scheduler 2.x,使用 :discard_past => true ( https://github.com/jmettraux/rufus-scheduler/blob/two/README.rdoc#every-jobs-and-first_at--first_in最后句子)

b) 不要在笔记本电脑上使用 dashing

c) 使用 rufus-scheduler 3.x,默认情况下,过去不会调度

于 2013-09-17T23:58:58.973 回答
0

根据 rufus-scheduler 2.0.x 文档,我可以使用scheduler.cron(可能与blocking => true选项结合使用)而不是scheduler.every这样,一旦调度程序进程空闲,将来就不会触发错过的作业。

于 2013-09-17T23:36:15.910 回答