Re: question re: daily limit (Lisa)
Joe Wells <[email protected]>
| Newsgroups | gmane.comp.misc.workrave.user |
|---|---|
| Message-ID | <[email protected]> |
Lisa <[email protected]> writes: > Hi, I'm not sure, does this quote below mean there was an attachment to my > email? I don't recall attaching anything. > > Any answer to the question? I'd like to set the computer to notify at 10:30pm > regardless of hours spent on the computer, is this possible? Hi, Lisa, Just make 2 cron jobs, like this: crontab -l > my-cron-jobs echo '30 22 * * * gconftool-2 --set --type=int /apps/workrave/timers/daily_limit/limit 3600' >> my-cron-jobs echo '0 6-22 * * * gconftool-2 --set --type=int /apps/workrave/timers/daily_limit/limit 14400' >> my-cron-jobs crontab my-cron-jobs This will set your daily limit to 1 hour (3600 seconds) at 22:30 each day. Presuming you have already used the computer more than 1 hour, the daily limit will be triggered immediately. At 06:00 each day, this will reset your daily limit to 4 hours (14400 seconds). It also does this at 07:00, 08:00, etc., through 22:00; this is to handle the possibility that your computer happens to be off at 06:00. This works because gconftool-2 tells the (hopefully already running) gconfd-2 process about the new setting, and this process in turn notifies your (presumably already running) Workrave process. This should also work if neither of these processes are running because the new setting should be noticed the next time they are running. All of this assumes you have cron installed and running on your Linux (or other UNIX) computer. For Windows you can no doubt do something similar with the Windows job scheduling mechanisms, but I do not know the details so you'll have to figure it out for yourself. > Thanks, Lisa > > Date: Mon, 09 Nov 2009 21:15:49 -0800 > From: Lisa <[email protected]> > Subject: [Workrave-user] question re: daily limit > To: [email protected] > Message-ID: <[email protected]> > > Hi, I have a question about workrave. Is it possible to set the daily > limit to a particular time of day rather than tracking time spent at the > computer? > Thanks, Lisa Ray Satiro <[email protected]> writes: > Sorry, what you ask is currently not possible with Workrave. I will file a > feature request for you but frankly this is the first time I recall someone > asking for this feature and it's unlikely to be implemented without a lot more > support. Happy Thanksgiving It would be lovely if this were directly supported by Workrave instead of requiring the user to hack around with cron jobs and gconftool. -- With my best regards, Joe ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july