I really read many tutorials, but crontab doesn't start notify send.  What I've tried:   etc/crontab  added at the end:  15 * * * * notify-send 'crontab' 'test'  with crontab interface:  crontab -e   added at the end:  15 * * * * notify-send 'crontab' 'test'
55519
I made a script that should notify me when there's a new chapter of manga that I'm reading. I used the command notify-send to do this. The program works when I am trying to run it in terminal. The notification is showing. However, when I placed this in my crontab, the notification doesn't show. I'm pretty sure that the program is running since I made it to create a file for me. The file was created, but the notification didn't show.  Here's my script  #!/bin/bash    #One Piece Manga reminder     #I created a file named .newop that contains the latest chapter.     let new=$(cat ~/.newop)     wget --read-timeout=30 -t20 -O .opreminder.txt http://www.mangareader.net/103/one-piece.html  if (( $(cat .opreminder.txt | grep "One Piece $new" | wc -l) &gt;=1 ))     then         (( new+=1 ))         echo $new         echo $new &gt; ~/.newop         notify-send "A new chapter of One Piece was released."     else         notify-send "No new chapter for One Piece."         notify-send "The latest chapter is still $new."     fi         exit   And here's what I wrote in my crontab  0,15,30,45 12-23 * * 3   /home/jchester/bin/opreminder.sh
14853
System crontab:  /etc/crontab   Root crontab:  sudo crontab -u root -e   Which way is preferred? As they all run tasks within administration privilege.
70961
I am looking for a method built-in to ubuntu that will allow me to run a script or program or whatever for a fixed period of time.  , but the package is unavailable for Ubuntu. In any case, I was hoping for something built-in.  The only thing i can think of is to get the current time and set a cron job 30 minutes from 'now' that will kill the program.  I was hoping there was a way to do this without setting up a script, but if I need to - it wont be the end of the world. After the 30 minute interval I would like to put my laptop in a sleep mode, but this can be separate from the timer thing.  Thanks in advance.
38824
I am running CentOS 5.3 and would like to log all messages from the "at" daemon. My syslog.conf contains the following entry:  cron.* /var/log/cron   I assumed that cron line in syslog refers to the entire family of "cron, anacron, at and batch". However, while cron and anacron actions seem to get looged, "at" actions do not get logged. How do I log atd actions?  Thank you for your attention   (Added) I would like to add the contents of my syslog.conf just in case there is an error:  # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.*                         /dev/console  # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none;cron.none        /var/log/messages  # The authpriv file has restricted access. authpriv.*                      /var/log/secure  # Log all the mail messages in one place. mail.*                          -/var/log/maillog   # Log cron stuff cron.*                          /var/log/cron  # Everybody gets emergency messages *.emerg                         *  # Save news errors of level crit and higher in a special file. uucp,news.crit                      /var/log/spooler  # Save boot messages also to boot.log local7.*                        /var/log/boot.log
35519
Is there any way to make/run a bash script on reboot (like in Debian/Ubuntu for instance, since thats what my 2 boxes at home have)  Also, any recommended guides for doing cron jobs? I'm completely new to them (but they will be of great use)
76130
I have set up a cron job, but for some reason it fails to run during the night. The same job runs fine when i'm running it during the day (i.e. setting up the same job to run in a few minutes and waiting for it to run).  Some logs:  Jun 17 14:04:01 server CRON[20174]: (root) CMD (/home/server/scripts/sync.sh &gt;&gt; /home/server/logs/nightly.log 2&gt;&amp;1) Jun 17 14:12:01 server CRON[20349]: (root) CMD (/home/server/scripts/sync.sh &gt;&gt; /home/server/logs/nightly.log 2&gt;&amp;1) Jun 17 14:23:01 server CRON[20513]: (root) CMD (/home/server/scripts/sync.sh &gt;&gt; /home/server/logs/nightly.log 2&gt;&amp;1) Jun 18 01:00:01 server CRON[25717]: (root) CMD (/home/server/scripts/sync.sh &gt;&gt; /home/server/logs/nightly.log 2&gt;&amp;1) # this runs during the night Jun 18 01:00:01 server CRON[25706]: (CRON) error (grandchild #25717 failed with exit status 2) # doesn't leave anything behind it, not even the nightly.log file - as though the command itself is invalid)   cron entry looks like this:  0 1 * * * /home/server/scripts/sync.sh &gt;&gt; /home/server/logs/nightly.log 2&gt;&amp;1   script looks like this:  #!/bin/bash  SUCCESS=0 echo "Running nightly automation..." echo "Running xxxx script..." SUCCESS=`/home/server/scripts/xxxx.sh &amp;&amp; echo 1` if [ $SUCCESS -eq 1 ]; then         echo "xxxx success!" else         echo "xxxx fail!" fi echo "Running rsync..." /usr/bin/rsync -am --remove-source-files /path1/ /path2/ --log-file=/home/server/logs/sync.log &amp;&amp; echo "rsync success!"
90849
I have this python script. I'm trying to run it on a crontab, but it isn't working:      from datetime import datetime x="Hello, it is now %s." % datetime.now().strftime('%d-%m-%Y %H:%M:%S') import csv try:     with open('output.csv', 'w+') as csvFile:         writer=csv.writer(csvFile)         writer.writerow(x) finally:     csvFile.close()   The crontab is defined as:  attyan22@LAPTOP-SGBTV53C:~$ crontab -l * * * * * python hello_time.py   attyan22@LAPTOP-SGBTV53C:~$ service crond start crond: unrecognized service   I want to run automatically, but it does not working. This is just test .
13012
I have a few cleanup commands to run for my datacaching scheme.  I was thinking a bash script would be an easy way to check if the full clean up job needed to be run.  But the cache is very time sensitive, so the check script needs to run every second.  What's the best way to do this?  Crontab only goes down to minutes, which makes sense for most applications.  Can I install a bash script as a background service?  On second though, can I just start it with the &amp; command and make it loop forever with a one second sleep?
116101
Is there a way to indicate to  how/where to find (paths to)  tools such as python, nmap, php and so on?  I ask this because when I schedule a job using crontab -e, I always need to specify the full path of python, nmap and whatever other tool I want to use.
14503
If I place a shell script in /etc/cron.daily/, at what time of the day will it be executed?
75750
I'm trying to create a script which starts some programs  startup.sh  knetworkmanager emesene keepassx   The problem is that when I run the script, it only starts knetworkmanager. This is because it'll start it, then wait until it's finished. How can I start a program without waiting for it? I don't think I can just add "&amp;" after each command, because all processes will still be killed when the script is finished.
14072
Hi there is a bunch of videos and resources on how to rsync locally rsync /home/user1 /home/user2/backup, but i haven't found any tutorials on rsync crontab to another server  pretty much, i use crontab -e and i have a script i run from rsynch.sh  #!/bin/bash rsync -xza /home/willchap  willchap@server02:/home/willchap/backup   it will work fine without crontab, the problem is, i am guessing crontab fails because it is asking for a password  what are my options here?
116444
I have tried to make this task for abacron:  dm@dm-system:~$ cat /etc/anacrontab  # /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details.  SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root LOGNAME=root  # These replace cron's entries 1   5   cron.daily  run-parts --report /etc/cron.daily 7   10  cron.weekly run-parts --report /etc/cron.weekly @monthly    15  cron.monthly    run-parts --report /etc/cron.monthly @daily 5 /home/dm/Devel/btsync &amp;&amp; notify-send "Btsync loaded (pid `pidof btsync`)" "Link &lt;a href='http://0.0.0.0:8888/gui/'&gt;here&lt;/a&gt;."   this command well done from my xubuntu terminal   /home/dm/Devel/btsync &amp;&amp; notify-send "Btsync loaded (pid `pidof btsync`)" "Link &lt;a href='http://0.0.0.0:8888/gui/'&gt;here&lt;/a&gt;."   but when i started my notebook i saw in /var/syslog:  Aug 14 10:49:06 dm-system anacron[904]: Anacron 2.3 started on 2014-08-14 Aug 14 10:49:06 dm-system anacron[904]: Invalid syntax in /etc/anacrontab on line 14 - skipping this line Aug 14 10:49:06 dm-system cron[841]: (CRON) INFO (pidfile fd = 3) Aug 14 10:49:06 dm-system cron[998]: (CRON) STARTUP (fork ok) Aug 14 10:49:06 dm-system cron[998]: (CRON) INFO (Running @reboot jobs) Aug 14 10:49:07 dm-system anacron[904]: Will run job `cron.daily' in 5 min. Aug 14 10:49:07 dm-system anacron[904]: Jobs will be executed sequentially Aug 14 10:54:04 dm-system anacron[904]: Job `cron.daily' started Aug 14 10:54:05 dm-system anacron[2616]: Invalid syntax in /etc/anacrontab on line 14 - skipping this line Aug 14 10:54:05 dm-system anacron[2616]: Updated timestamp for job `cron.daily' to 2014-08-14
58473
How can I make crontab email me with the output of its jobs? I have MAILTO=redacted@yahoo.com.au above the jobs, but it doesn't work.  I know I need to use something like Postfix or Sendmail but for the life of me I cannot find out how to achieve this. I've searched and searched for a simple guide on setting up Postfix but they're all insanely complicated and expect you to be setting up a whole server to send and receive email and to know all the terms (like, what is a domain name for outgoing emails?).  All I want to do is have crontab email me. Why is this so difficult??  Additional Info:  My crontab file looks like this:  MAILTO=redacted@yahoo.com.au 1 0 * * * ~/Desktop/toskymesh.sh 59 6 * * * ~/Desktop/tooptus.sh 0 3 * * * snapraid sync   More Additional Info:  The output of ps -ef | grep '[s]endmail'  root 6840 1370 0 10:26 ? 00:00:00 sendmail: MTA: accepting connections   I know for sure cron is working, but I'm testing the mail command with echo Test | mail -s Test redacted@yahoo.com.au anyway.
6981
I wrote this script, but it doesn't work:  #! /bin/bash cront=$(crontab -e) echo 00 23 * * 5 tar -cpzf /var/backup.tar.gz /home/$USER &gt;&gt; $cront   How can I add a cronjob using a script?
1396
I want to write a crontab that opens Firefox every minute (just to test it, I know it doesn't make any sense). My problem is that even though crontab is active nothing happens. This is how my crontab looks like:  SHELL=/bin/bash PATH=~/bin:/usr/bin:bin * * * * * export DISPLAY=:0.0 xhost localuser /usr/bin/firefox   Any idea why it isn't working?
101172
I have a program that prints some output that I would like to pop up on my terminal once every hour during the workday.  $ crontab -l 0 07-17 * * * /home/dat/scripts/cron.out   syslog reports the following:   (dat) CMD (/home/dat/scripts/cron.exe) Jun 18 12:02:01 picard CRON[10848]: (CRON) info (No MTA installed, discarding output)   What am I missing?