Bug 191714 - gnome-schedule cannot parse perfectly reasonable crontab lines
gnome-schedule cannot parse perfectly reasonable crontab lines
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gnome-schedule (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Frank Arnold
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-15 09:14 EDT by karl kleinpaste
Modified: 2008-02-10 05:56 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-10 05:56:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description karl kleinpaste 2006-05-15 09:14:21 EDT
Description of problem:
I thought I would experiment with gnome-schedule, which I just noticed in Extras
a few days ago.  It is unable even to parse my fairly bland crontab file.

Version-Release number of selected component (if applicable):
1.0.0

How reproducible:
Every time

Steps to Reproduce:
1. Use this crontab:

################################################################
# notification bombs
30	11  * * 1-5	DISPLAY=:7.0 /usr/local/bin/notify Lunch.
0	17  * * 1-5	DISPLAY=:7.0 /usr/local/bin/notify 5pm.
0	18  * * 1-5	DISPLAY=:7.0 /usr/local/bin/notify 6pm.
################################################################
# regular meetings
15,25,30 10 * * 1,3,5	DISPLAY=:7.0 /usr/local/bin/notify Datapath, Excalibur, 10:30.
################################################################
# afs/krb authentication preservation
12       7,19 * * *	DISPLAY=:7.0 /home/karl/bin/xkkinit
################################################################
# mail archival activities
# - swish++
50          4 * * *	umask 077 && cd Mail && /usr/local/bin/index -p101
personal/* list/* mailer-daemon usenet archive/*/* > swish++.out 2>&1

2. Run gnome-schedule.
3. Observe that only one line survives, and that /tmp/xses-YourName.WhatEver
gains numerous lines reading: "ERROR: Failed to parse crontab record"
  
Actual results:
"ERROR: Failed to parse crontab record"
Observe that it hasn't even got the decency to tell me what lines are "wrong",
nor "why" it failed.

Expected results:
A whole lot more lines in the gnome-schedule pane to work with.

Additional info:
I've been using crontab entries like these literally for decades.

Educated guessing: Someone has hand-rolled their own crontab parser, rather than
just picking up parser code directly from vixie-cron.

More educated guessing: The timespec parser doesn't cope with more than a single
whitespace character between fields.
Comment 1 Frank Arnold 2006-05-17 14:54:05 EDT
Confirmed. I looked at the problem the last two evenings, and got your crontab
to parse. However, there are other problems that need to be adressed upstream.

Basically, the parsing is done with a regular expression. This would work just
fine, but it's really broken at the moment. Doesn't cope with leading
whitespaces either...

Additionally, Gnome-Schedule appends a comment to each self created line with a
title and a path to an icon. But it's nearly impossible to safely extract this
information afterwards, as title and path can contain quite every possible
character sequence. I don't have an easy solution for this handy.

Would you mind to open a bug in Gnome Bugzilla? If you don't have an account I
can do it for you of course.
Comment 2 karl kleinpaste 2006-05-17 18:10:55 EDT
I don't have a Gnome Bugzilla account; sorry.  If you would open the report
there, it would be appreciated.
Comment 3 Frank Arnold 2006-05-23 21:46:27 EDT
Sorry for the delay. It's done now:
http://bugzilla.gnome.org/show_bug.cgi?id=342751
Comment 4 Gaute Hope 2006-05-24 04:17:46 EDT
hail,

we are working on a different solution now, perhaps trying to port some of
vixies code to python. even thou we have support for previous crontab and at
records the gnome-schedule parser at the current state has been written mainly
for crontab records made by gnome-schedule. 

further progress posted in gnome bugzilla.

- gaute, gnome-schedule maintainer.

Note You need to log in before you can comment on or make changes to this bug.