[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron and laptop



Quoting christophe barbe (christophe.barbe@inup.com):
> I use potato on a laptop and my laptop is on only when i'm using it. 
> When I start, cron launches various task (too many at the same time) and take a big part of the CPU. 
> 
> It's crazy : you turn your computer 2 minutes on (you do near nothing), cron works. After a night you turn on your laptop another time (no big changes has occured during the last session) and cron restart everything.

Sounds more like anacron, unless you turn on your laptop at exactly the
same time each day (about 07:30).

> Is there a way to better configure cron for a laptop usage?
> - limit CPU usage ?
> - start daily script only after an amount of cumulled (i'm not sure it's an english word, i mean the sum of previous uptime) uptime.

Put a huge delay in /etc/anacrontab, then use anacron -n when you
actually want them to run, e.g. when making the coffee.

Or write a script that runs anacron -n, sleeps a while and shuts down
the laptop, and run it when you're finished computing but you're not
going off to somewhere else.

Or... whatever you can think of.

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



Reply to: