GNOME Bugzilla – Bug 342751
gnome-schedule cannot parse perfectly reasonable crontab lines
Last modified: 2006-10-03 14:34:06 UTC
Originally reported to Fedora BTS by Karl Kleinpaste: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=191714 The problem mentioned in this report could be fixed quite easily. However, by looking at it I found other corner cases that won't work. See attached valid crontab file. Also attaching a patch that solves some issues, but not everything. I wouldn't apply it, just shows the state of my work. Currently, I don't have much time to dig into it further. Personally I would try to place the title and icon path comments on separate lines ahead of the entry.
Created attachment 66101 [details] Valid crontab with problems
Created attachment 66102 [details] [review] Dump of my work
Just some comments to the original bugpost: We support different cron daemons, and there might be problems using the parser from one of them, but perhaps it isn't too hard to just port the vixie code to python? The TITLE and ICON stuff is a problem, perhaps we could find some other solution for this.. do we need a separate file? The gnome-schedule parser is mainly made for crontab records made in gnome-schedule.
Parsing of entries is located at line 71 in entry.c of vixie-cron source, look for your src.rpm and check it out. This is what we have to support and have to port to python. vixie-cron v4.1
As a note, as posted by Frank Arnold. There should be a dialog for setting enivornment variables. Global and local for each job(in the seperate script file).
Notice the new branch; NEW_CRONTAB_PARSE. Work on porting vixie-cron parsing should be commited here.
This should be parsed nicely if you check out the latest copy from the NEW_CRONTAB_PARSE branch, doesn't support old gnome-schedule titles and icons. This is written in more vixie style. A new feature where gs adds a JOB_ID to each task aswell(and to old ones if you edit them) where title and icon, and aswell the future describtion, fields are stored. Have a look in the dir: ~/.gnome/gnome-scheduel/crontab and the files last_id, 1, 2, 3.. as you keep adding/editing tasks. - gaute
Merged into HEAD, started making the same for at.
data files for both. should parse nicely.