Cron - GUI ?

I would like to set a cron job, and I thought there was a GUI to do this (but cannot find it). Am I wrong ? Is it command line only ?

Used to have kcron not sure whether it has been ported yet.

(Never did this before, so I’m a bit lost.)

If I understand right, you manage cron jobs with the crontab command.

crontab <filename>

where filename is a text file where you set the cron parameters (?)

The job I would like to start is to retrieve quotes for GnuCash (daily from Monday to Friday, starting at 23:00).
The command to run is “gnucash --add-price-quotes $HOME/gnucash-filename”.
What should I write in the file to be given to crontab ?

crontab -e

Is the command
Then MIN HOUR DAY MONTH DAYOFWEEK command i.e

10 6 * * * date

This would run the date command at 06:10 every day

Just to be on the safe side it is generally I good idea to provide the whole path so date becomes /bin/date. Also if the command is a little complicated you can tell it to run a script instead.

AmigaPhil wrote:

>
> I would like to set a cron job, and I thought there was a GUI to do
> this
> (but cannot find it). Am I wrong ? Is it command line only ?
>
>
I’m gonna assume you’re running kde4.x, correct? then in systemsettings
(aka configure desktop) -> advanced -> task scheduler

Suse 11.1 x64, Kde 4.2.1, Opera 10.x weekly

Thanks ! (I also found more details with ‘man 5 crontab’ than with ‘man 1 crontab’).

So I think what I need is:

* 23-8 * * 1-5 gnucash --add-price-quotes $HOME/gnucash-filename

(?)

From the GnuCash guide, I see a " > /dev/null 2>&1" is appended to the example command. I know the " > /dev/null" is to suppress the command output, but what is the “2>&1” for ?

I have KDE 4.1 installed (you are right that it is probably from where I saw a scheduler interface), but I’m using Gnome 2 as my regular DE.

If you read man bash about redirection it should help a bit more.

The file descriptors are as such
0 stdin
1 stdout
2 stderr

hcvv gave me a better understanding of this over here…
A couple of questions… tty/pts and bootup(inittab,.xinitrc etc)

What you’ve told it is to redirect stderr to the place stdout goes now.

But as I said in the above thread hcvv gave up much of his time and experience, I sort of struggled with bits.(Thank you hcvv)

Hi
I packaged up Gnome Schedule awile back for somebody here. Search at
Get It for
gnome-schedule.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
up 2 days 0:35, 1 user, load average: 0.42, 0.15, 0.10
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Thanks again !

Just one last question:
I fear that using a “23-8” hour range will make the command to be executed every hours in that range. The expected result is to have the command ran ONCE when the time is somewhere in that range.
Is this possible ? (Else, I’ll use the exact “23” hour.)

:good: :slight_smile:

I’ve just installed it but, erm :shame: , I don’t find it under ‘New Applications’ (?)

(Edit: Found it under Système > Tâches Planifiées (French) :slight_smile: )

You would be correct that is my understanding you could look into fcron, which doesn’t presume you’re running all the time. But will run a missed cron.

Perhaps the gui mentioned above makes it easier to create.

The other option would be to call a script that checks i.e make/check a timestamp in a file if within a range then do, if not don’t

^
Hope that makes sense

Yes. My first idea to use “* 23-8 * * 1-5” was bad as it would have ran the command every minutes between 23:00 and 8:59. (Now using “0 23 * * 1-5”.)

gnome.schedule is a good front-end for crontab !

From what I read about fcron, it does indeed what I wanted to: having a command ran once somewhere between 23:00 and 8:59. I’ll have a look at it later. (It’s on the Factory repository. Have you tried it ? Is it stable ?)

(About fcron)

The 1click-install from the Factory failed.
I however still have fcron listed as installed packages, but Yast cannot remove it (uninstall fails too, no details available except ‘–’).
How can I safely remove it ?

Where did you get fcron from? Neither webpin or OBS search can find it.

I was trying to repeat it, in my vmware.

Edit
mmm just stumbled across cron.daily but that I presume is run as root so I guess you would have to do su user first. After doing a search for Suse fcron

From Software.openSUSE.org
Select openSUSE Factory, and search for “fcron”.

There’s some more detail on cron here:
Cron Tables (Crontab) in Suse / openSUSE [Event Scheduler for 10.x, 11.x]

OK I haven’t got a clue why but the only way to remove it is to install xbt-tracker from the same source then remove fcron, then remove xbt-tracker.

xbt-tracker dragged a couple of deps for me but I’m an x-less install.

How did I solve well I tried zypper from the command line to see what msg’s. Kept telling me about xbt-tracker missing in init.d, so i thought lets give it to it first then.

Edit
Wow swerdna that site is becoming a wealth of snippets. Though in this case from a brief look it would need to be a cron.daily which I didn’t notice, but did only scan very quickly.

By the way the syntax would of only run once an hr between 23-8 not every minute. I’m not sure whether there is syntax for every minute even the mins would only run once an hr.

That did it ! :good: (Why a Torrent related dependency for fcron ??) - Thanks !

@swerdna

Thanks too !
I’ve almost understood how it works now. I’m using, for now, the exact 23:00 time with cron (my Linux machine is usually still up at that time), until I find a stable solution like the one offered by fcron.