Menu

Tree [r45] /
 History

HTTPS access


File Date Author Commit
 at 2019-10-16 sgerwk [r44] add script to remove old at jobs
 child 2017-11-02 sgerwk [r37] install waiting and manual
 cron 2019-07-08 sgerwk [r40] compile against the new non-recursive makefile ...
 programs 2017-10-26 sgerwk [r21] print the name of the running program
 COPYING 2015-04-18 sgerwk [r1] generic input device via /dev/input (including ...
 Makefile 2019-07-10 sgerwk [r41] print message when cron or cronie sources canno...
 Makefile.local 2019-07-08 sgerwk [r40] compile against the new non-recursive makefile ...
 README 2017-10-27 sgerwk [r28] document timeout in waiting
 TODO 2015-04-18 sgerwk [r1] generic input device via /dev/input (including ...
 index.html 2017-10-27 sgerwk [r34] option for waking up only for some crontab entries
 rtcidle-resume.service 2019-07-10 sgerwk [r42] systemd service files
 rtcidle-suspend.service 2019-07-10 sgerwk [r42] systemd service files
 rtcidle.1 2019-07-10 sgerwk [r43] new immediate modes: forced and wakeup-only
 rtcidle.after 2019-07-10 sgerwk [r43] new immediate modes: forced and wakeup-only
 rtcidle.before 2015-04-18 sgerwk [r1] generic input device via /dev/input (including ...
 rtcidle.c 2020-05-20 sgerwk [r45] print inactivity time
 rtcidle.conf 2015-06-09 sgerwk [r5] check if /dev/rtc is a link, enable wakeup in /sys
 rtcidle.h 2017-10-27 sgerwk [r33] simplify cronqueue.c
 rtcidle.service 2019-07-10 sgerwk [r42] systemd service files

Read Me

rtcidle is a Linux daemon that suspend the computer (with apm or acpi)
if no user activity has been detected for a given amount of time;
	- does not suspend if a program listed in /etc/rtcidle.conf
	  is running
	- if an at or cron job is to be executed in less
	  than 5 minutes, it does not sleep
	- it sleeps until 2 minutes before the next scheduled
	  at or cron job, or until 22:58 hours in the
	  future, whichever comes first

**************************************
* See also index.html in the package *
**************************************

Installation
------------

Vixie cron or cronie sources are required in a local directory;
update the VCRDIR variable in Makefile.local accordingly;

	make
	cp rtcidle.conf /etc

Copying rtcidle.before and rtcidle.after to /etc and
customizing them might be useful.

Queues
------

The directories at/ and cron/ contains code for finding the
next time at or cron have a scheduled job.

atqueue.c:
	time_t atnext(time_t now, int *running);
	next time for an at scheduled job; if running is not
	NULL, it will be stored whether an at job is
	currently running (according to the at queue, note 
	that is not reliable)

cronqueue.c:
	time_t cronnext(time_t now, char *include,
	                char *exclude, char *prog_name);
	next time for a cron job; pass argv[0] as prog_name;
	include and exclude limit the search by cmdline

programs.c:
	char **readList(char *filename);
		reads a list from a file (list of program names to check)
	int runningProgram(char **list);
		checks whether any of the program in the list is running

Child
-----

This directory contains 'waiting', a standalone program.
Run a program as 'waiting programname arg arg arg...' to
avoid suspending when the program is running. This program
also allows specifying a timeout.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.