LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2017, 03:45 AM   #1
Hail Happiness
LQ Newbie
 
Registered: May 2017
Distribution: Linux Mint 18.1
Posts: 16

Rep: Reputation: 1
Trouble with crontab calling notify-send


I want to run a command in crontab that sends a popup notification at 1:00, 1:05, 1:10, and 1:15 AM every day.

What I did:

- Ran crontab -e in terminal
- Pasted
Quote:
*/5 1 * * * /usr/bin/notify-send 'Title of the message' 'Text of the message' >/dev/null 2>&1
- Exited the crontab editor

What went wrong:

- It didn't work

Additional info:

- If I run crontab -l, it shows my command as pasted above, but doesn't run it
- The editor opens the crontab file as a temporary one (not sure about this, but definitely in the /tmp folder, not /home or /usr)
- Running Mint 18.1

What I need to know:

- What file do I need to write the changes to? I tried /etc/crontab (had to run the editor as sudo to do so), but that didn't work. I am told that that is the system crontab file (I don't know the difference).
- Is the script correct?
- What is the difference between user and system crontab?
- What do I need to do in general?

Thanks for the help
 
Old 06-30-2017, 05:11 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 20,764

Rep: Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053Reputation: 7053
you should redirect stdout and stderr into file(s) to see what's happening
 
  


Reply

Tags
crontab, newbie, notify


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Send Results of Curl Command to Notify-Send? jakfish Linux - General 7 09-01-2016 08:55 AM
Notifications don't show up (notify-send notify-osd) michal017 Linux - Desktop 0 05-06-2014 03:44 PM
notify-send failure brooksbi Linux - Newbie 2 11-16-2012 10:41 AM
notify-send through ssh cccc Debian 0 08-14-2011 07:44 AM
using notify-send ashikahamed Ubuntu 0 05-02-2008 06:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration