Hello claw!
On 21 Apr 2022, claw said the following...
to work quite right. It detects correctly and executes correctly,
however it just stays in the running status forever. It prevents the other tasks from running. The Interval one works fine connects collects
What does your command line look like?
Guy to a T. Only change I have made and it seemed to make it actually work this far was change the command from a | to a && which I know is
the Linux option to have multiple commands on one line to execute in succession.
I think the | is a "Mystic special" which would translate to ; in Linux (i.e. separating multiple commands on one line)...
The && will only execute what follows it if the command before it succeeds (although that might be desired).
I also use semaphores a lot, and have split up the events more than the
"stock" installation does. I'm also using custom scripts to run the export commands etc., but the following examples might still give an idea of how things can be done.
I've had some problems in the past with 'mis poll' and 'qwkpoll' getting stuck forever, so I use the 'timeout' command in some places to safeguard against this.
Poll events:
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 11 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Poll mail/news Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Interval Mon │ No █---- ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 1 Tue │ No █WTFS ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █WTFS ░▓░ ▓ ▀ █░░█ Yes█ Shell │ touch /home/bbs/mystic/semapho Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ▓ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ █ ░ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Shell: touch /home/bbs/mystic/semaphore/poll.now
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 14 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Poll mail/news Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █---- ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █WTFS ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █WTFS ░▓░ ▓ ▀ █░░█ Yes█ Shell │ /usr/local/sbin/ftnpoll.sh Thu │ No █ ▓█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ poll.now!poll.bsy Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ poll.now █ ░ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 17 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Poll QWK networks Sun │ No █ ░█▄▄
░████ Yes█ Event Type │ Interval Mon │ No █ ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 1 Tue │ No █ ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █ ░▓░ ▓ ▀ █░░█ Yes█ Shell │ touch /home/bbs/mystic/semapho Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ █ ▓ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Shell: touch /home/bbs/mystic/semaphore/qwkpoll.now
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 13 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Poll QWK networks Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █ ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █ ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █ ░▓░ ▓ ▀ █░░█ Yes█ Shell │ timeout -k 300 --preserve-stat Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ qwkpoll.now Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ qwkpoll.now|qwkmail.out █ ▓ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Shell: timeout -k 300 --preserve-status -v 300 ./qwkpoll all
Kill After: qwkpoll.now|qwkmail.out
Export events:
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 18 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Export outbound netmai Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █---- ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █WTFS ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █WTFS ▓▓░ ▓ ▀ █░░█ Yes█ Shell │ /usr/local/sbin/ftnexport.sh - Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ netmail.out!mutil.bsy Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ █ ░ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Description: CUSTOM: Export outbound netmail
Shell: /usr/local/sbin/ftnexport.sh -f|touch /home/bbs/mystic/semaphore/send.now
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 22 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Export outbound echoma Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █---- ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █WTFS ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █WTFS ▓▓░ ▓ ▀ █░░█ Yes█ Shell │ /usr/local/sbin/ftnexport.sh|t Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ (echomail.out|newsmail.out)!mu Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ █ ░ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Description: CUSTOM: Export outbound echomail/news
Shell: /usr/local/sbin/ftnexport.sh|touch /home/bbs/mystic/semaphore/send.now Semaphore: (echomail.out|newsmail.out)!mutil.bsy
Send events:
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 16 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Send outbound mail/new Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █---- ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █WTFS ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █WTFS ░▓░ ▓ ▀ █░░█ Yes█ Shell │ /usr/local/sbin/ftnsend.sh -f Thu │ No █ ▓█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ send.now!poll.bsy Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ send.now █ ░ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Description: CUSTOM: Send outbound mail/news
Shell: /usr/local/sbin/ftnsend.sh -f
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 15 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Send QWK network mail Sun │ No █WTFS ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █WTFS ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █ ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █ ░▓░ ▓ ▀ █░░█ Yes█ Shell │ timeout -k 300 --preserve-stat Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ qwkmail.out Sat │ No █ ▓ ▌░░
█ Yes█ Kill After │ qwkmail.out █ ░ ▀▄
█ Yes█ Warning │ 0 █ ░
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
Shell: timeout -k 300 --preserve-status -v 300 ./qwkpoll all
Nodelist event:
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event Editor ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Event ID 19 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █
█ Act█ █s █
▄▄ █ ───█ Active │ Yes █──── █▓gj!
▐█▄▄█ Yes█ Description │ CUSTOM: Process nodelists Sun │ No █ ░█▄▄
░████ Yes█ Event Type │ Semaphore Mon │ No █ ░██▒■ ▀ ▓███ Yes█ Exec Hour │ 0 Tue │ No █ ░██▌▐ ▓ ▒▓▓█ Yes█ Exec Min │ 0 Wed │ No █ ░▓░ ▓ ▀ █░░█ Yes█ Shell │ ./mutil -run MergeNodeLists Thu │ No █ ░█░ ▓ ░░▓███ Yes█ Prefix ./ │ No Fri │ No █ ░ ▄▄█ ▄▄■ ▀█ Yes█ Semaphore │ nodelist.now!mutil.bsy Sat │ No █ ░ ▌░░
█ Yes█ Kill After │ nodelist.now █ ░ ▀▄
█ Yes█ Warning │ 0 █ ▓
█ ───█ █──── █
█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
As you can see, I "invented" the semaphores poll.now, qwkpoll.now and send.now, and I let the Interval events touch (create) those semaphores so that the actual commands for performing any actions are only in *one* place each (the Semaphore events).
I also "invented" the nodelist.now semaphore which I create externally (in cron jobs) when one or more nodelists have been received and unpacked.
The events use the condition !mutil.bsy extensively in order not to launch until an ongoing mutil run has finished (otherwise it would just complain and refuse to do anything and the event would effectively be lost).
I have created external scripts for polling, exporting and sending, but in your case, those calls could be replaced with 'timeout --foreground -k 300 --preserve-status -v 300 ./mis poll uplink', './mutil run -ExportEchoMail' and 'timeout --foreground -k 300 --preserve-status -v 300 ./mis poll send', respectively.
(When running mis via timeout from within a script, --foreground might be needed to timeout in order to prevent ./mis from hanging on SIGTTOU until the timeout has expired. See
https://lists.gnu.org/archive/html/bug-coreutils/2013-11/msg00002.html for more info.)
Hoping this can give some inspiration to an alternative events approach. =)
Best regards
Zip
--- Mystic BBS v1.12 A48 2022/04/03 (Linux/64)
* Origin: Star Collision BBS, Uppsala, Sweden (21:1/202)