Can't get Kcron to launch a program

Hello World,

I need to have a program launch at specific times(not at startup!) and after a bit of googling I decided the best/easiest GUI option for me would be Kcorn.

Installed it, couldn’t make it work, tried dozens of different command permutations after asking for help on another forum, still nothing.

If you wanna go through the whole thing you can find it here, but the TLDR is with the command entered below for example if I click the little run button the konsole launches then my program starts like it should

But if I let it run on schedule all I get is a python error

I honestly don’t know what else to do, please how can I make the scheduler just launch my little iptv program automatically at certain times??!?! :sob:

Thank you.

P.S. The yuki-iptv program is a flatpak, if it matters.

I like Kalarm… I use it to set my rtcwake, prepare the system for suspension at night (with the option to delay if I’m not ready) also to set up my system after it wakes up in the morning…

I use Kalarm too, but that’s just for displaying messages(and maybe playing sounds? never could get that part to work) on the screen aka an alarm, you can’t make it launch other programs, right?

What Plasma is this? I don’t have the Task Scheduler setting.

Regards

I’m not sure if I got this right, but the application you’re trying to start scheduled is a “normal” application with a graphical interface, is that right? In that case, the problem is that “cron” (the scheduler) is not running in an environment that knows about your Display and thus the application probably crashes trying to draw its application window. There might be solutions to this, but they heavily depend on if you’re using X11 or wayland.

I am using wayland, the app I am trying to start is a regular flatpak app @amilias called yuki-iptv that I installed with the Discover store, and my version of KDE is 6.5.4.

The “Task scheduler” option only appeared in the Session part of my system settings after I installed Kcron through the Discover store.

Let me know what other info you need to me to provide everyone, and thank you.

1 Like

Thanks. My question was curiosity only.

Regards

I use it with scripts… at 6.50am increasing volume thus:

amixer -q set Master 50%;
amixer | rg 'Front Left: Playback' | cut -c 15-

then for backing up my Bitwarden, it executes ‘bwbk’

You can enter any command or script.

1 Like

Oh. I’m a newb I don’t do scripts, at least not yet. The Kcron scheduler GUI is very nice and meets my needs in this aspect, I just need help to get it to work please. :cry:

kcron is not simpler - you still have to actually write down the command to say what it is that you want to do.

I have only 2 kcron entries set by back-in-time, for all things I scheduled myself I find kAlarm simpler.

True, but once you figure out what the right “run” command is then you have a few nice and easy to use buttons to choose when it happens. Otherwise you would have to integrate that into your script making it even more complex I’m guessing…

Rather than guessing, try simply typing your commands into KAlarm and look at those shiny buttons instead… You don’t have to write them as a script, you can simply enter commands… it’s just a way to schedule stuff.

Finally, thankfully solved on the other forum, yaaay!!! :grin:
The command that ended up working was
/usr/bin/systemd-run --user /usr/bin/flatpak run io.github.yuki_iptv.yuki-iptv