Scheduling a task

If I wanted to have 11.1 open a text file right in front of my face at 11:00 every night telling me to “GO TO BED!” how would I go about doing that? I tried to tell kcron in Kde 3.5.10 to do it by aiming it at the text file I created, but it said it couldn’t locate the program.

I would need to see the cron job, before being able to make a comment on this. This guide may help you.

BTW, the kdialog command is useful for this for displaying desktop messages. For example:

kdialog --msgbox “Go to bed!”

kdialog --help (for more options).

Scott Swinyard wrote:
> If I wanted to have 11.1 open a text file right in front of my face at
> 11:00 every night telling me to “GO TO BED!” how would I go about doing
> that? I tried to tell kcron in Kde 3.5.10 to do it by aiming it at the
> text file I created, but it said it couldn’t locate the program.
>
>
when you say “aiming it at the text file”, how and what did you aim?

kcron is in the business of launching applications, not displaying
text files…that is, you should ‘aim’ kcron at an application
capable of displaying a text file…like say kwrite…

so your cron would be set to launch kwrite and point IT to your text
file, like:

kwrite /home/[you]/Documents/GoToBed

of course, you have to use the real path and text file name…

there are more elegant solutions, but that should work…


palladium

Thanks for the replies.

Deano, I ran that command in a console, but I don’t see any options for setting when or how often a dialog can be shown…

Palladium. I went to “edit”, then “new” and entered the command into the “program” field in Kcron. When I hit the “ok” button at the bottom of the dialog was when it said it couldn’t locate the program. As a matter of fact I followed exactly the procedure you described after that considering that it might not simply open that type file with the default text editor, but it didn’t work. That was when I posted, what, about 12:30 last night? hehe. No problem though. It worked this morning after I read your post and tried again.
So thanks, and now all we have to do is wait and see if it actually opens the file tonight at 11:00 and tells me to go to bed.

Scott Swinyard wrote:
> now all we have to do is wait and see if it actually
> opens the file tonight at 11:00 and tells me to go to bed.

if you can run Linux, AND make a cron job, then you should be smart
enough to not need the machine to . . .

nevermind :slight_smile:

hmmmmm, i guess if you stay up all night we will know it didn’t work, huh?


palladium

Deano, I ran that command in a console, but I don’t see any options for setting when or how often a dialog can be shown…

You misunderstood me. It is provides a more elegant means for displaying messages. You use it as part of your command string in your cron job. An idea on its use here:

Linux.com :: Create GUI dialogs for GNOME and KDE

“You misunderstood me. It is provides a more elegant means for displaying messages. You use it as part of your command string in your cron job. An idea on its use here:”

Oh…

It’s not a matter of being smart enough, it’s a matter of being too stupid to…

Well it didn’t work. I tested it early. The Kcron Handbook said “Don’t forget to tell your system to start the crond cron daemon first, or KCron won’t work.” Yast had nothing named crond in the runlevel editor but cron was there. I made sure the cron daemon was running, and I checked the enable box while I was setting the task up in Kcron.

The command works because I tried it in a console.

Am I missing anything?

> Well it didn’t work. I tested it early. The Kcron Handbook said

ha! look at the date on that ‘handbook’ in “internet years” that was
built about the same time as the pyramids in Egypt…

i’m saying you shouldn’t be too surprised that the changes that have
taken place in Linux/SUSE means that you might have trouble using
everything you can find anywhere on the net…

someone else will have to give you the magic for Kcron, my advice
would be to forget about Kcron and just go ahead and use the generic
command line Linux tools for cron, something like this as a daily cron
job ought to pop up a reminder each evening at 23:00 local time…

00 23 * * * kdialog --msgbox ‘Go to bed!’

see if you can figure out (with google) how to make a cron job…

http://www.google.com/search?&q=how+to+make+a+cron+job


palladium

Swerdna has a good introduction to Cron here:

Cron Tables (Crontab) in Suse / openSUSE [Event Scheduler for 10.x, 11.x]

> ‘Cron Tables (Crontab) in Suse / openSUSE [Event Scheduler for 10.x,
> 11.x]’ (http://opensuse.swerdna.org/susecron.html)

that is an excellent resource…had i known about it i probably would
have pointed to it…i often do point to Swerdna’s answers…


palladium
Have a lot of fun…

The same page I pointed to in my first post (read ‘guide’). :slight_smile:

You’re saying the handbook is out of date? Ok. I didn’t get it from the net though. It was on the the app help menu. No problem. Not sure what you were getting at.
I’ll check the stuff you guys said to since I don’t know how to complete that kdialog command. It doesn’t look like it will be too hard.
Sorry Deano I didn’t realize that the guide you mentioned would pertain directly to what I was trying to do at that moment.
Hopefully I’ll be able to figure something out from here.

Thanks