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

Re: using cron to power up and down the machine with a dell inspiron 3500



> 		How do I make my dell inspiron 3500 start up to run certain tasks and
> then shut down again? 

On many systems, the CMOS has a feature to wait upon a time, then turn the
system back on.  This only works because the CMOS clock runs seperately of
your computer.

> I don't know that leaving laptops on all the time
> even if using AC power is a good idea, as it does get noticably warm after
> long use. I use a special speech patch called speakup that makes linux work
> on a text console, 

Linux has worked at a text console forever (even when it didn't work yet),
I assume you need speech services to access the system usably?

> so x-windows doesn't have any place in what I do in
> linux, so those bugs don't apply. 

> I thought in windows-98 had a schedule
> option that said, wake up when time to perform task, I tried to test it,
> and the machine wouldn't boot up at the time I chose to run the action. 

cron, and/or PlusPack's Scheduler for MSwin, expect a CPU around to be checking
with about the time.  You might do many things to reduce the load it's under,
and have it "napping" waiting on a cron or at job.  But while you're under 
suspend or hibernate, the BIOS holds all the cards, and the CPU is inactive.

> If I ever have to use the laptop as my only computer, I'd like to be able to
> record streaming audio on it and have the machine start when the show is
> almost ready to begin, make sure it's connected to the internet so modem
> noise isn't recorded, record the program and shut down,

Hmm, not exactly something I'd use a laptop for specifically, but okay, I
can see it...

Why would modem noise be recorded if it's receiving a 'net stream?

> is there an easy
> way to do it, possibly that doesn't involve playing in the bios every time
> I want to change my tasks to run? 

You *could* try compiling a kernel with /dev/nvram support, then experimenting
to find out what your CMOS values twiddle in the results.  Once you've got
that figured out, then maybe you can just tell /dev/nvram that you want to 
change things, by "tweaking the CMOS" without rebooting.  Results completely
BIOS dependent though.

In short, no it's not easy, 
      and no you can't do it without playing in the bios, 
but that doesn't guarantee that you can't do it anyway.

> I know my modem goes through the sound
> system because I tested with external speakers, and I heard modem noise
> through them. 

So your computer will be used for recording an -external- sound source
(e.g live dancing, living room stereo system) or an -internet- sound source
(raw bits, just stuff 'em in a file before/as you play 'em?)

> How do I configure cron to power the machine up when it's
> time to do the task? 

even if the nvram trick has an answer that works, cron won't be the tool 
that you use.

> I can set ppp to boot up with the machine
> automatically, but don't want the task always running when I connect, just
> when I connect after powering up from that interface.

Write a script that:
	sets an at-job to run your stream-sucker app at 5-til your show
	diddles nvram to awaken you at 10-til your show
	puts the system into "hard" suspend aka hibernate.

presumably your stream-sucker app takes parameters like how long to scribble
for, and whether to turn the machine back off afterwards.

You are -really- trusting your sysclock and hwclock to be in sync, so maybe
syncing the time before hitting hibernate is a good idea.  Pick your own
direction.  Many apmd configs already do this.

I really don't think this is a laptop's best features, to try and emulate
a poor man's TiVo or whatever.  I hope you have just BUTTLOADS of battery
life since you'll be running the disk pretty hard when it's awake.  But 
those 12mm huge hard disks from IBM are looking tastier every day.

(anyone know if those hard disks suck more power, and how much more power
they draw?)

> I don't really want
> to record other stuff over the file I wanted to listen to whenever I start
> my ppp.

You could also use some sort of flag in /var/run or /var/lock to say that 
you want these sorts of things to happen.  Which presupposes that you also
write up a way to clean out these crumbles!

-* Heather * star@ many places *-



Reply to: