After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 463856 - support @daily and other aliases
support @daily and other aliases
Status: RESOLVED FIXED
Product: gnome-schedule
Classification: Other
Component: general
1.1.0
Other All
: Normal enhancement
: ---
Assigned To: GNOME Schedule Maintainers
GNOME Schedule Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-06 03:49 UTC by Paul Wise
Modified: 2007-11-17 22:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paul Wise 2007-08-06 03:49:48 UTC
http://bugs.debian.org/422946

It would be nice if gnome-schedule supported the aliases @reboot, @yearly,  annually, @monthly, @weekly, @daily, @midnight and @hourly documented in the debian crontab(5) manual page.
Comment 1 Gaute Hope 2007-08-06 08:58:52 UTC
It does support:
			"@reboot"  : '@reboot',
			"@hourly"  : '0 * * * *',
			"@daily"   : '0 0 * * *',
			"@weekly"  : '0 0 * * 0',
			"@monthly" : '0 0 1 * *',
			"@yearly"  : '0 0 1 1 *'

I could include @midnight as well, but I probably would if it was listed where I found the list the first time.. meaning that there are some versions of crontab that doesn't support @midnight. And at this time gnome-schedule only supports the version with the least features to be able to be compatible.

Do you know if @midnight is available in both vixie and dcron?

- gaute
Comment 2 Paul Wise 2007-08-06 09:16:19 UTC
I added a @daily line to my crontab and gnome-schedule 1.1.0 did not show it in the GUI. 

'man 5 crontab' on Debian systems lists these:

              @reboot        Run once, at startup.
              @yearly        Run once a year, "0 0 1 1 *".
              @annually      (same as @yearly)
              @monthly       Run once a month, "0 0 1 * *".
              @weekly        Run once a week, "0 0 * * 0".
              @daily         Run once a day, "0 0 * * *".
              @midnight      (same as @daily)
              @hourly        Run once an hour, "0 * * * *".

Dunno about other distributions or dcron (Debian uses vixie cron).
Comment 3 Gaute Hope 2007-08-06 09:25:58 UTC
Ok, that is a bug. Could you run gnome-schedule from the command line with the daily entry that you created and post the output here.

- gaute
Comment 4 Paul Wise 2007-08-06 09:35:40 UTC
$ crontab -l | grep ^@ 
@daily echo foo
@hourly echo foo
$ gnome-schedule 
regexp: 1
Comment 5 Gaute Hope 2007-11-16 13:51:17 UTC
We have support for @reboot, without checking if we are not dealing with vixe cron, the other special expressions will be converted to their standard expression since they mean exactly the same it makes no sense to use them as they are. It will only break support for other crontab daemons on this point.

This means; evey time you open and edit an job with one of these @ expressions, even if only to show it and press apply afterwards they will be converted.

Dcron is not much more used and as I see it gnome-schedule will only fail if you try to add an "At reboot" record and I have little motivation to enter the forest of different versions and crontab implementations here.. And I will just leave it like this now.

- gaute
Comment 6 Paul Wise 2007-11-17 06:16:42 UTC
Hmmm, be nice if I could edit my crontab with crontab -e or gnome-schedule. Thats a minor wishlist though.
Comment 7 Gaute Hope 2007-11-17 13:29:51 UTC
You can, if you want. Or I misunderstand.
Comment 8 Paul Wise 2007-11-17 22:34:32 UTC
Ah, I should have been more clear, I think it would be good if the @daily and so on were preserved if they exist in the crontab. I also think that their existence is a fairly good indicator that the cron implementation on the machine supports them, since crontab -e should do syntax checks. If they exist, then you could use that as a hint that they are supported and use them for any new tasks. As I said, both are minor, and I understand if you don't feel like implementing them.