I configured a regular task   me@alpha:~$ crontab -l | grep '^\*' */5 * * * * (cd ~/Documents/OrgMode; git add .; git commit -m "defensively save")   It works but I cannot find the log in mail.log  me@alpha:~$ grep 'git' /var/log/mail.log me@alpha:~$ grep 'git' /var/log/mail.log   Where could I find the log?
32645
I want to verify that my cron job is executing and at what time.  I believe there is a log for my sudo crontab -e jobs, but where?      I searched google and found recommendations to look in /var/log (in which I do not see anything with 'cron' in the name) and to edit the file /etc/syslog.conf which I also do not have.
90844
How can I prevent (certain cronjobs) from filling my syslog in Ubuntu 15.04? I have some jobs that run 4 times a minute and quickly fill up my syslog files.  I've tried adding:  cron.*                                                  /var/log/cron   to /etc/rsyslog.conf, but this didn't resolve anything.  The current output is:  Aug  8 06:58:01 elitegameservers CRON[25706]: (gijs) CMD (   sleep 15; unison -batch /var/www ssh://server1//var/www) Aug  8 06:58:01 elitegameservers CRON[25703]: (gijs) CMD (   sleep 30; unison -batch /var/www ssh://server2//var/www) Aug  8 06:58:01 elitegameservers CRON[25708]: (gijs) CMD (unison -batch /var/www ssh://server2//var/www) Aug  8 06:58:01 elitegameservers CRON[25713]: (gijs) CMD (   sleep 30; unison -batch /var/www ssh://server1//var/www) Aug  8 06:58:01 elitegameservers CRON[25714]: (gijs) CMD (   sleep 45; unison -batch /var/www ssh://server1//var/www) Aug  8 06:58:01 elitegameservers CRON[25717]: (gijs) CMD (   unison -batch /var/www ssh:// server3//var/www) Aug  8 06:58:01 elitegameservers CRON[25719]: (gijs) CMD (   sleep 15; unison -batch /var/www ssh:// server3//var/www) Aug  8 06:58:01 elitegameservers CRON[25690]: (CRON) info (No MTA installed, discarding output) Aug  8 06:58:01 elitegameservers CRON[25694]: (CRON) info (No MTA installed, discarding output) Aug  8 06:58:08 elitegameservers CRON[25588]: (CRON) info (No MTA installed, discarding output)
589
This is a  about using cron &amp; crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.
6655
Our small company runs an Ubuntu Server 11.10, to which a couple of people have SSH access. The actual terminals are sometimes used, too. How can we locally log all Bash commands run, along with user and time stamp?  We can assume that no-one is nefarious and actively trying to avoid the logging, but we'd still prefer the users not to have direct write-access to their log files. Simultaneous sessions must be handled correctly.
40322
I have a crontab that looks like  0 0 * * * pg_dump DB_NAME &gt; /path/to/dumps/`date +%Y%m%d`.dmp   which works fine when I run it manually, but not when cron runs it. After digging through the logs, I see  Dec 12 00:00:01 localhost crond[17638]: (postgres) CMD (pg_dump DB_NAME &gt; /path/to/dumps/`date +)   It looks like a problem with percent signs, but the man page doesn't even contain the percent character at all, so I thought they were alright.
61510
I was hacked this morning!  Does anyone have an idea of what the entry of the crontab below might mean?  1st They created a dir structure  .rsync/ ├── a │   ├── a │   ├── anacron │   ├── cron │   ├── init0 │   ├── run │   └── stop   2nd: The executed this cronjob from: crontab -l  0 */3 * * /home/ftpuser/.nullcache/a/upd&gt;/dev/null 2&gt;&amp;1 @reboot /home/ftpuser/.nullcache/a/upd&gt;/dev/null 2&gt;&amp;1 5 8 * * 0 /home/ftpuser/.nullcache/b/sync&gt;/dev/null 2&gt;&amp;1 @reboot /home/ftpuser/.nullcache/b/sync&gt;/dev/null 2&gt;&amp;1 0 0 */3 * * /tmp/.X17-unix/.rsync/c/aptitude&gt;/dev/null 2&gt;&amp;1   Last: ran all my CPU's at 100% and sucked all the bandwith from the network.  I killed all associated PID'S to ftpuser and everything went back to normal
46471
How do I keep logs of all the work done via terminal? For example, I want a record of all the work done on database via terminal.
80933
I tried committing files with CRLF-ending lines, but it failed.  I spent a whole work day on my Windows computer trying different strategies and was almost drawn to stop trying to use Git and instead try .  Please share only one best practice per answer.
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?
79194
I am reading an article about   There is something about disabling automatically sending emails.        Disable Email By default cron jobs sends an email to the user account executing the cronjob. If this is not needed put the following   command At the end of the cron job line.  &gt;/dev/null 2&gt;&amp;1       What is the detailed meaning for 2 &gt; &amp; and 1? Why putting this to the end of a crontab file would turn off the email-sending thing?
76982
My aim is to log all output from a script into a directory that the script is going to create.  For example, I have:  ~/.abc.sh:  #! /bin/bash rails new myapp   When I run...  cd ~/code . ~/.abc.sh   ...that will create a new Rails app in directory ~/code/myapp.  When Rails is creating an app, it outputs a whole lot of text that I want to capture and store in a log file in the same directory the rails command newly created. I also want to display that text in the terminal as well.  How do I go about doing this?
18461
I have a script that works when I run it from the command line, but when I schedule it with cron I get errors that it cannot find files or commands.  My question is twofold:   When I schedule a cron job using crontab -e, does it use my user ID as the basis for its permissions?  Or does it use a cron user ID of some sort and its related permissions? When a cron job is launched, what is the working directory?  Is it the directory where I specify the script to run, or a different directory?   Here is my cron job:  15 7 * * * /home/xxxx/Documents/Scripts/email_ip_script.sh   Here is the actual script:  vIP_ADDR="`curl automation.whatismyip.com/n09230945.asp`" echo "$vIP_ADDR" sed "s/IPADDR/$vIP_ADDR/g" template.txt &gt; emailmsg.txt ssmtp XXXXX@gmail.com &lt; emailmsg.txt   Here are the errors I get when I view the mail message produced by cron:  sed: can't read template.txt: No such file or directory /home/xxxx/Documents/Scripts/email_ip_script.sh: line 15: ssmtp: command not found   It cannot find the template.txt but it resides in the same directory as the script.  It also cannot run ssmtp, but I can as my user.  What am I missing to get this to work properly?
116872
For Email Logs, we follow below steps generally: Go to Setup--> Logs --> Email Log Files --> Request an Email Logs --> Download(once it is ready).  Is there any way to access this information programatically using REST API or using SOQL.  In which object, these information is stored?
19322
I want to backup all the emails (their content) on a server where I run Postfix, so that later on I'll be able to restore the emails, on other server or locally. Among other folders, I have this: $ ls -al /var/spool/  total 16 drwxr-xr-x  4 root    root 4096 May 22  2018 . drwxr-xr-x 16 root    root 4096 Sep  5 18:28 .. drwxrwxrwt  3 root    root 4096 May 23  2018 mail drwxr-xr-x 18 postfix root 4096 Sep 11 20:01 postfix  What precisely do I have to backup, what folders?
43053
Following a lot of people's advice, I am trying to use Mavensmate. Coming from developer console, there are still things I am not used to. One thing is I can't find where the debug log is. I tried everything I can think of under Mavensmate > debugging, but it seems to just processing for a while and then tell me it is a pass - but where is the log?   I assume that the debug log is not auto-generated like in developer console - so need to generate either a quick or debug log before opening it. Is that correct?
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.
81580
I am trying to make a crontab that makes a new .tar file each minute every business day by using the following code:  */1 * * * 1,2,3,4,5 tar -cf /home/user/Archiv/$(date +"%Y%m%d%H%M").tar /home/user/Textverarbeitung/ -P   This doesn't work. Why?