Bug 191714 - gnome-schedule cannot parse perfectly reasonable crontab lines
Summary: gnome-schedule cannot parse perfectly reasonable crontab lines
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-schedule
Version: 5
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Frank Arnold
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-15 13:14 UTC by karl kleinpaste
Modified: 2008-02-10 10:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-10 10:56:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description karl kleinpaste 2006-05-15 13:14:21 UTC
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 18:54:05 UTC
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 22:10:55 UTC
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-24 01:46:27 UTC
Sorry for the delay. It's done now:
http://bugzilla.gnome.org/show_bug.cgi?id=342751

Comment 4 Gaute Hope 2006-05-24 08:17:46 UTC
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.