dcron
dcron copied to clipboard
EAGAIN doesn't work (for me)
Hi,
if a job returns code 11, it should be scheduled again, but isn't (in my setup).
A simple script to test this is:
!/bin/bash
bit=$(bc <<< "(($(date +%s)+30)/60)%2") echo -n "${bit}: " >> /tmp/logfile date >> /tmp/logfile [ ${bit} -eq 0 ] && exit 11 exit 0 and then add "*/2 * * * * ID=test /path/to/toggle" to your crontab.
The script should be run each minute:
- at even minutes due to direct call from dcron and
- odd minutes due to "exit 11" during even minutes. However, it's only run at even minutes.
I'm runing crux (crux.nu) and installed dcron from source: http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz
cheers, deepthought