• Mystic Event Editor "Interval" Setting

    From Grud@21:4/115 to All on Sun Dec 22 21:46:02 2019
    Hello,

    I don't see any docs on the event editor. What exactly does the "Interval" setting do for an event. In some of the default ones, they use the Interval with a time of 01:00, while the other is set for 03:00. Does this mean run every hour and every 3 hours? Confused.

    The other setting is Hourly which obviously runs every 60 minutes.

    Thanks

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: -::[ Phaseshift BBS // phased.port0.org:2323 ]::- (21:4/115)
  • From Avon@21:1/101 to Grud on Sun Jan 12 09:15:26 2020
    On 22 Dec 2019 at 09:46p, Grud pondered and said...

    I don't see any docs on the event editor. What exactly does the

    Here we go :)

    [snip]

    Here is a description of each Event type:

    TYPE1: Semaphore
    ================
    This event type listens for one or more "semaphore" files, and will execute
    a command line if one or more of the semaphore files are found. Prior to
    executing the command line, MIS will also delete the detected semaphores.

    The following options are used for Semaphore type events. Any other
    options
    not mentioned here can be ignored for this type:

    Active - If yes this event will be active. Set to No to disable.
    Description - This can be any description you want.
    Exec Type - This is one of BBS, Shell, or Semaphore
    Semaphore - This defines the semaphore filename to "look" for. If
    there is no path included, Mystic will automatically look
    in the configured semaphore directory. In addition, more
    than one semaphore file can be monitored by using a pipe
    symbol to separate them (|). For example:

    Semaphore: echomail.out|netmail.out

    The above example will look for the existance of EITHER
    echomail.out or netmail.out in the configured semaphore
    directory. If either file is found, the event will remove
    the semaphore files and then execute the event.

    Semaphore: c:\mybbs\somefile.txt

    The above will list for the c:\mybbs\somefile.txt and
    trigger the event if it is found.

    Shell - This is the command line which will be executed when the
    event is triggered. Similar to the Semaphore detection,
    this can have one *or more* executions per event each
    separated by a pipe. If no path is supplied, MIS will
    default to the root Mystic BBS directory. For example:

    Shell: domail.bat

    The above example will execute domail.bat in the root
    Mystic BBS directory.

    Shell: mutil export.ini|fidopoll send|mutil import.ini

    The above will execute 3 command lines in a row:

    mutil export.ini
    fidopoll send
    mutil import.ini

    If we put it all together we can get something like this:

    Active: Yes
    Description: Send outgoing echomail
    Exec Type: Semaphore
    Semaphore: echomail.out|netmail.out
    Shell: mutil export.ini|fidopoll send|mutil import.ini

    The above example wait for echomail or netmail.out, and
    execute mutil to export, then fidopoll to send, then
    mutil to import any new packets. Completely automated!

    TYPE2: Shell
    ============
    This event type executes on a defined time, defined on a weekly schedule.
    When the event executes, it will execute the Shell command line. Like the
    Semaphore event type, this Shell command can also execute multiple command
    lines by separating them with a pipe character (|).

    The different between this type and Semaphore is that instead of waiting
    for a file, the event is defined by a specific execution time. This is
    defined by picking which days of the week the event should execute, and
    what time per day it should be ran (in 24-hour format). For example:

    Active: Yes
    Description: Pack message bases
    Exec Type: Shell
    Shell: mutil msgpack.ini
    Exec Hour: 01
    Exec Min: 30

    Sun: No Mon: Yes Tue: No Wed: No Thu: No Fri: No Sat: No

    The above event would execute once per week, at 1:30am on Monday morning
    and execute the command line "mutil msgpack.ini" from the root Mystic BBS
    directory.

    TYPE3: Interval
    ===============
    This event type is similar to the shell event type, except that the hour
    and minute define a time interval. For example, if you want to execute
    the event every 15 minutes you would set:

    Exec Hour: 00
    Exec Mins: 15

    If you wanted to run the event every 3 hours and 30 minutes, you set:

    Exec Hour: 3
    Exec Mins: 30

    When the time interval expires, the shell command line is executed with
    the same possiblities as the other events (using the pipe character, etc).
    This event is commonly used to polling for mail.

    TYPE4: BBS
    ==========
    This event type is not actually executed by MIS itself, and is similar to
    what you might have found in old DOS-based BBS software. The purpose for
    this event is to provide an option to force users to log off the BBS if
    you want them to.

    Like the scheduled Shell event, a BBS type event can be scheduled at a
    certain hour/min and one or more days of the week. In addition to the
    time/day scheduling there are some other options:

    Node: This defines the node number for which the event will execute.
    If you keep the node number at 0, it will be applied to all
    users on all nodes.

    Warning: This determins the time before the event to notify the user
    of the upcoming event. This can be set to 0 to never warn
    them,
    or (for example) 10 to give them a message that they will be
    required to logoff in 10 minutes.

    When this event time hits, the user will be logged off of the BBS if they
    have not already logged off on their own.


    [snip]

    Hope that helps :)

    --- Mystic BBS v1.12 A43 2019/03/03 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From Zip@21:1/202 to Grud on Sun Jan 12 07:17:28 2020
    Hello Grud!

    On 22 Dec 2019, Grud said the following...
    I don't see any docs on the event editor. What exactly does the "Interval" setting do for an event. In some of the default ones, they
    use the Interval with a time of 01:00, while the other is set for 03:00. Does this mean run every hour and every 3 hours? Confused.

    Yep, Exec Hour and Exec Min determines the interval at which the event runs (repeatedly), starting that amount of time from when MIS was started, I
    think. The day (Sun ... Sat) settings have no effect.

    Best regards
    Zip

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Star Collision BBS, Uppsala, Sweden (21:1/202)
  • From Grud@21:4/115 to Avon on Sun Jan 12 19:21:00 2020
    Thanks for posting that. I think much of my problem is that I didn't reboot the MIS daemon after changing events. I couldn't figure out why none of my events were running properly.

    Cheers

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: -::[ Phaseshift BBS // phased.port0.org:2323 ]::- (21:4/115)
  • From Grud@21:4/115 to Zip on Sun Jan 12 19:24:04 2020
    Thanks! Appreciate the info.

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: -::[ Phaseshift BBS // phased.port0.org:2323 ]::- (21:4/115)
  • From ryan@21:1/168 to Grud on Sun Jan 12 22:39:38 2020
    Thanks for posting that. I think much of my problem is that I didn't reboot the MIS daemon after changing events. I couldn't figure out why none of my events were running properly.

    Maybe the event listener in mis should also watch for changes in the event config, perhaps via automatic generation of a semaphore. Hey, it's like we almost already have the entire codepath to pull this off! g00r00, you out
    there anywhere? ;)

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Grud@21:4/115 to ryan on Mon Jan 13 21:01:32 2020
    Maybe the event listener in mis should also watch for changes in the
    event config, perhaps via automatic generation of a semaphore. Hey, it's like we almost already have the entire codepath to pull this off!
    g00r00, you out there anywhere? ;)

    Heh yeah, I just assumed that the event config would be reloaded without
    taking down the entire board to do so. Oh well, it's not so bad when you realize that is the way it works. Not like you change the event config that often anyway.

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: -::[ Phaseshift BBS // phased.port0.org:2323 ]::- (21:4/115)
  • From ryan@21:1/168 to Grud on Mon Jan 13 22:37:18 2020
    Heh yeah, I just assumed that the event config would be reloaded without taking down the entire board to do so. Oh well, it's not so bad when you realize that is the way it works. Not like you change the event config that often anyway.

    I use linux, so what I should really be doing it setting up systemd services
    to monitor for semaphores, or cron. But mystic makes it so easy...

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: monterey bbs (21:1/168)
  • From Grud@21:4/115 to ryan on Thu Jan 16 10:42:54 2020
    I do have some things in cron as well, but I like the flexibility of Mystic's event editor too. Works well once you restart the daemon.

    Take care

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: -::[ Phaseshift BBS // phased.port0.org:2323 ]::- (21:4/115)
  • From g00r00@21:1/120 to ryan on Mon Jan 20 06:47:00 2020
    Maybe the event listener in mis should also watch for changes in the
    event config, perhaps via automatic generation of a semaphore. Hey, it's like we almost already have the entire codepath to pull this off!
    g00r00, you out there anywhere? ;)

    I think it already does this. Or it used to maybe? I can't remember hah

    I'll put it on the list of things to check.

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)