• BBS question

    From Greg Youngblood@1:123/131 to All on Sat Dec 14 04:58:37 2019
    Question

    trying to setup a crontab job, I have a sh file that runs

    ./fidopoll 0:0/000
    ./mailin.sh
    ./mailout.sh

    I'd like to know how to add the command to open a terminal window then run those commands in the .sh file.

    Thanks....

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Wicked BBS|wickedbbs.com:2333 (1:123/131)
  • From Richard Menedetter@2:310/31 to Greg Youngblood on Sat Dec 14 19:59:02 2019
    Hi Greg!

    14 Dec 2019 04:58, from Greg Youngblood -> All:

    trying to setup a crontab job, I have a sh file that runs
    ./fidopoll 0:0/000
    ./mailin.sh
    ./mailout.sh

    I'd like to know how to add the command to open a terminal window then
    run those commands in the .sh file.

    Why do you need a terminal window for that?

    CU, Ricsi

    ... Professionals are predictable, it's the amateurs that are dangerous.
    --- GoldED+/LNX
    * Origin: Never hit a man when he's down - always kick him. (2:310/31)
  • From Alan Ianson@1:153/757 to Greg Youngblood on Sat Dec 14 15:11:48 2019
    Hello Greg,

    trying to setup a crontab job, I have a sh file that runs

    Cron doesn't have the paths that your regular user has so it's always a good idea to use the full path to the executables when running from cron.

    ./fidopoll 0:0/000
    ./mailin.sh
    ./mailout.sh

    The above should run if you are running a script from cron that first changes to your mystic directory. In the crontab enter the full path to the script.

    I'd like to know how to add the command to open a terminal window then
    run those commands in the .sh file.

    I have never done that and don't know if it's possible. Cron is meant to run commands unattended so they are not seen.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Richard Falken to Alan Ianson on Sun Dec 15 07:08:50 2019
    Re: BBS question
    By: Alan Ianson to Greg Youngblood on Sat Dec 14 2019 03:11 pm


    I'd like to know how to add the command to open a terminal window then run those commands in the .sh file.

    I have never done that and don't know if it's possible. Cron is meant to run commands unattended so they are not seen.


    It has been some time since I last did something of this sort, but you should set the proper DISPLAY variable in cron and authorize the cron user to use that display.

    I think you can do it, but it sounds very fragile to me. Plus, if you don't have a working display by the time cron triggers, it all will crash.

    If invoking the scripts from a graphical interface was a must, I would forget about cron and use my desktop environment to load a while loop that called the commands periodically.
  • From Alan Ianson@1:153/757 to Richard Falken on Sun Dec 15 10:25:16 2019
    Hello Richard,

    I have never done that and don't know if it's possible. Cron is
    meant to run commands unattended so they are not seen.

    It has been some time since I last did something of this sort, but you should set the proper DISPLAY variable in cron and authorize the cron
    user to use that display.

    I have never done that. It might be possible, I wouldn't know.

    I think you can do it, but it sounds very fragile to me. Plus, if you don't have a working display by the time cron triggers, it all will
    crash.

    There is nothing fragile about cron. It just gets stuff done on schedule. There
    is no way (that I know off) to see what cron is doing but it will go ahead and
    do what you tell it to do, when you tell it to do it.

    If invoking the scripts from a graphical interface was a must, I would forget about cron and use my desktop environment to load a while loop
    that called the commands periodically.

    Yes, if you want to see some kind of output cron is not the way.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Greg Youngblood@1:123/131 to Alan Ianson on Sun Dec 15 18:25:36 2019
    Cron doesn't have the paths that your regular user has so it's always a good idea to use the full path to the executables when running from cron.


    Hay thanks, I'll keep screwing around and see what I come up with.


    Thanks

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Wicked BBS|wickedbbs.com:2333 (1:123/131)
  • From Alan Ianson@1:153/757 to Greg Youngblood on Mon Dec 16 14:19:34 2019
    Hello Greg,

    Cron doesn't have the paths that your regular user has so it's
    always a good idea to use the full path to the executables when
    running from cron.

    Hay thanks, I'll keep screwing around and see what I come up with.

    I use cron to touch flow files to poll nodes and to post my BBS ads on a schedule.

    You can also do what you were doing (poll nodes and run mutil to import/export)
    with Mystic's events, if you have mis running.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)