My earlier thread on this (under “64-bit”) has gone cold, and perhaps it was misplaced – but please refer there for history. With others’ help I think I am on the right trail – a perl script that becomes active when the machine goes inactive (!) and executes an rtcwake command designed to spur the computer into action at a designated time so that cron tasks are performed. The script, which is given below and which originated at a Ubuntu forum, is not working, and so I am trying to understand it. Not being familiar with perl, I’m stuck at the line containing the test if(m/^\s+boolean true/){ … what does this mean? Thanks, jdw
#!/usr/bin/perl
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver', member='SessionIdleChanged'\"";
while (<IN>) {
if (m/^\s+boolean true/) {
system("/usr/sbin/rtcwake -m mem -t $(date --date=01:00:00 +%s)");
system("/usr/sbin/rtcwake -m mem -t $(date --date=05:00:00 +%s)");
system("/usr/sbin/rtcwake -m mem -t $(date --date=10:00:00 +%s)");
system("/usr/sbin/rtcwake -m mem -t $(date --date=15:00:00 +%s)");
} elsif (m/^\s+boolean false/) {
system("echo Issued a wake-up reminder to ensure scheduled crontab jobs run");
}
}