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 557181 - Recurring tasks don't trigger, but tests work successfully
Recurring tasks don't trigger, but tests work successfully
Status: RESOLVED DUPLICATE of bug 509233
Product: gnome-schedule
Classification: Other
Component: general
2.0.2
Other All
: Normal major
: ---
Assigned To: GNOME Schedule Maintainers
GNOME Schedule Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-21 05:27 UTC by Dennis Fisher
Modified: 2008-10-21 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dennis Fisher 2008-10-21 05:27:14 UTC
Please describe the problem:
I'm trying to set a task to pop up a notification every hour on the hour. Testing the task, the notification pops up as expected, but fails to actually run on it's own at the appointed time.

Steps to reproduce:
Ensuring that notify-send is installed (I believe it's not by default on Ubuntu at least), and as a normal user:

1. Create a new recurrent task
2. Set the command to: notify-send "Grandfather Clock" "It has been another hour."
3. Change the time to "Every minute" (for easy testing, every hour will also (fail to) work though)
4. Select "Add" (rest of the defaults are fine)
5. Click "Run Selected Task", a notification should pop up
6. Wait for the task to run on it's own

Actual results:
The notification never pops up, whether the GNOME Schedule window is left open or not.

Expected results:
The notification to pop up once an hour.

Does this happen every time?
This happens (or rather fails to happen) every time.

Other information:
This is on Ubuntu 8.10 Intrepid Ibex. If I should have filed the bug in their tracker, I apologize, but I've not filed all that many bugs and don't yet know best practices. I use their tracker for "core" apps, but this being a non-core app the upstream tracker (this one) seemed more appropriate.

As for why you'd want such a notification to run hourly, I found a Windows app called Snarl that does this by default along with other notification type things, and as someone who often loses track of time I found this to be a good way to be more mindful of time passing.
Comment 1 Gaute Hope 2008-10-21 05:43:01 UTC
Have you checked that crontab is running:

https://help.ubuntu.com/community/CronHowto

- gaute
Comment 2 Dennis Fisher 2008-10-21 08:21:52 UTC
I didn't see much there about checking to make sure anything in particular is running correctly or not, but after reading that and doing some more tweaking, here's some additional info I can provide. Also, I'm starting to think maybe this should have started off as an Ubuntu bug after all, now that I understand how the pieces fit together here, so sorry about that.

dennis@Nayru:~$ crontab -l
0 * * * * notify-send "Grandfather Clock" "The time is now Hourly Chime." #JOB_ID_1
* * * * * /usr/bin/notify-send "Test" "Message" >/dev/null 2>&1 #JOB_ID_2
dennis@Nayru:~$ which notify-send
/usr/bin/notify-send
dennis@Nayru:~$ ps aux | grep cron
root      5686  0.0  0.1   3412  1024 ?        Ss   00:46   0:00 /usr/sbin/cron
dennis   12090  0.0  0.1   3240   816 pts/0    S+   01:15   0:00 grep cron
dennis@Nayru:~$ 
Comment 3 Gaute Hope 2008-10-21 12:06:03 UTC
it seems that crond is running .. it should say /usr/sbin/crond and not cron. could you check if this is the case?

it is probably the same problem as in bug 509233. if you want to run a program that uses X or the desktop you need to specify which X server to connect to, normally :0.0 or :0

Try what's suggested in bug 509233; add 'export DISPLAY=:0.0 &&' before your command.

- gaute
Comment 4 Gaute Hope 2008-10-21 12:10:12 UTC
Or try whats suggested in https://help.ubuntu.com/community/CronHowto : 
add 'env DISPLAY=:0.0' or 'env DISPLAY=:0' before your command. 

Remember a space char before your command:
* * * * * env DISPLAY=:0.0 /usr/bin/notify-send "Test" "Message" >/dev/null 2>&1

if you want the error messages from notify-send, uncheck the no output box in gnome schedule and add something like ' > ~/notify-send.log 2>&1' at the end of your command. this will write any output from notify-send to the file notify-send.log in your home dir, it gets overwritten every time the program runs.

- gaute
Comment 5 Dennis Fisher 2008-10-21 12:11:54 UTC
All I did was add the export and sure enough it popped up a minute later all on it's own. Didn't even get as far as checking for crond. A winner is you! Thanks.
Comment 6 Gaute Hope 2008-10-21 12:13:49 UTC
No problem. marking as duplicate of bug 509233.

- gaute

*** This bug has been marked as a duplicate of 509233 ***