Results 1 to 2 of 2

Thread: I can't schedule a new task with cron

  1. #1
    Join Date
    Sep 2024
    Beans
    23

    I can't schedule a new task with cron

    Hello.

    I am not being able to schedule a task with crontab to execute a .run file, I put the path to the executable and it does nothing.

    I have also tried creating the task with the Crontab UI interface, but it does not execute either.

    I guess it's because it asks for the $DISPLAY variable when I run the file from the terminal.

    I would appreciate if there is any way I can run it through a scheduled task with crontab.

    Greetings.



  2. #2
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: I can't schedule a new task with cron

    You can't run GUI programs from the crontab without providing a GUI session for that connection. Usually it is best to find a different timer technique since GUI programs aren't meant to be run from crontabs.

    But you can setup an Xvfb if you like. Just be ready for failures. https://en.wikipedia.org/wiki/Xvfb 25 yrs ago, I had to do this at work for some terrible server software created by Oracle that didn't actually need a GUI, but their programmers included some X/Windows libraries, I suppose due to habit or convenience, that mandated it. We pointed it out to them, saying they should be embarrassed for a server process to require any GUI. It wasn't enough to make them change it, unfortunately.

    Of course, using the Xvfb you don't get to access the GUI or interact with the tool in anyway except though some client/server methods. For server software, this is expected anyway, so it shouldn't matter.

    BTW, .run file is meaningless. Extensions don't matter to Linux/Unix. They are only useful for humans and arbitrary ... or can be completely wrong, since the OS doesn't care.

    Lastly, if you want help with your crontab line, you'll need to post it here. Seems pretty obvious, right?
    Last edited by TheFu; 2 Weeks Ago at 02:00 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •