Topic: at

If I do

at 11:55

I get

Cannot open lockfile /var/spool/cron/atjobs/.SEQ: No such file or directory

sudo doesn't work either, nor adding an at.allow file in /etc + I'm not in at.deny.


Should be a 5 minute job to google a howto, but the reason I want this is to

at 04:45

a pink noise generator to drown out the thump-thump-thump of outdoor aerobics in the park outside that's waking me at an unholy hour, and I'm feeling a bit slow.  Either I get this working, or it'll be a

sudo shutdown power; wget shotgun /etc

I'm also trying to get the machine to suspend, and wakeup at a specified time.
There are some pointers eg in the mythTV page here http://www.mythtv.org/wiki/ACPI_Wakeup , specifically:

sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
sudo sh -c "echo `date '+%s' -d '+ 5 minutes'` > /sys/class/rtc/rtc0/wakealarm"
cat /sys/class/rtc/rtc0/wakealarm

Check:

cat /proc/driver/rtc

rtc_time    : 13:40:26
rtc_date    : 2008-12-21
alrm_time    : 10:45:00
alrm_date    : 2008-12-22
alarm_IRQ    : yes
alrm_pending    : no
24hr        : yes
periodic_IRQ    : no
update_IRQ    : no
HPET_emulated    : no
DST_enable    : no
periodic_freq    : 1024
batt_status    : okay

However, this doesn't work for me, the bit that says alarm_IRQ always says "no" for me, and there's nothing in my BIOS to enable or disable "wake from RTC" or similar.

What I found is this:  http://blog.bofh.it/debian/id_222

sudo rtcwake -m on -s 160

And then run gnome-power_command suspend.

Back to at, I could leave my pink noise generator running through the suspend, but that just seems messy., and anyway, I want to schedule some volume changes to phase it in and out.

I'm sure others could use this to wake their #! at a more reasonable hour, and play internet radio, or something soothing to wake up to, rather than my "try to stay asleep for another hour or two" alarm.

PS, I'm also going to experiment briefly with a simple sound-cancellation type thing, using jack and ecasound or similar (ie a microphone picks up the thump-thump, and then plays it slightly delayed, possibly inverted, in a speaker nearer to my head, in theory at least partially canceling out the original sound, at least for low frequencies, say <100Hz.  Perhaps I'll need an array of microphones and speakers.  Who knows, worth a quick try).  If anyone has any experience with that.....

Last edited by jackbang (2009-07-31 05:53:13)

Re: at

The sound cancellation sounds really interesting, let us know how it goes. For the white noise generator, have you tried setting it up as a cron job? I haven't tried setting a machine to wake at a certain time before, but if I have the time after work I'll help you look into it.

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: at

Yeah, thanks iggykoopa, cron is the sensible choice, I'm just using at for now while I'm prototyping, it's easier than putting up a new cron each time.  It seems at doesn't work on #! by default, unless it's just me, so I thought I'd report it.
rtcwake works fine for me BTW.