Cron is used to execute scheduled commands. It acts as a task scheduler on Linux and UNIX systems which will execute commands at specified times set by the user. Cron has a great deal of customization and is often used on server environments where common tasks are run on a regular basis.

learn more… | top users | synonyms (2)

1
vote
3answers
23 views

Root crontab not running

For some reason, my root cron tab does not seem to be running. Trying to reboot device every night at midnight. Should be the following as root: crontab -e Then add: 0 0 * * * /sbin/shutdown -r ...
0
votes
0answers
15 views

Run cron job to execute a script when a particular file is updated

I would like to automate a process which requires running a script to generate some files. To do this I thought that adding a cron job to run this script would be great. But I want cron to run the ...
17
votes
5answers
14k views

Changing default crontab editor

I am trying to change the default editor from nano to vim. I have run the following commands: sudo update-alternatives --config editor and update-alternatives --config editor Both now output: ...
0
votes
1answer
13 views

Custom cron job filename for a package

I'm willing to create a cron job for a package but when I define it in debian/cron.d it gets installed as /etc/cron.d/package. I'd prefer to be able to change the name of the cron job to be something ...
3
votes
5answers
5k views

Cron jobs show up in GNOME Scheduler but don't execute

I have configured Back In Time and MySQL Administrator to make a backup every day at 15:00. In order to be sure I have installed Gnome Scheduler to see whether these two applications are registered ...
4
votes
1answer
2k views

Does ubuntu support “@reboot” in crontab

Does ubuntu support "@reboot" in crontab ? I find documentation suggesting it is supported, but web chatter asserts it is not. I cannot make the @reboot section work. The "after midnight" section ...
0
votes
1answer
34 views

run a script and return system to suspended or running mode

Somehow I cannot find how to do this common task. I want to run a (backup) script daily at certain time regardless whether the system is running or suspended and return to the previous state ...
1
vote
2answers
105 views

can't reattach to screen

I've been having problems with screen (the terminal command). If I type screen -ls it gives me: No Sockets found in /var/run/screen/S-root. For screen -r I get: There is no screen to be ...
38
votes
5answers
36k views

How are administrators supposed to read root's mail?

What is the Ubuntu way for system administrators to receive system notifications, which typically take the form of e-mail sent to the root account? Examples of such notifications are the output of ...
1
vote
1answer
19 views

This anacron cron job is sending emails to me - how can I redirect the output to null? [duplicate]

$ cat update-notifier-common #!/bin/sh set -e [ -x /usr/lib/update-notifier/package-data-downloader ] || exit 0 # Try to rerun any package data downloads that failed at package install time. ...
0
votes
0answers
15 views

Many CRONs processes

My system from couple days have some strange issues. Main thing is that I can't ssh for most of my day. I noticed that is connected with amount of CRON porcesses. In crontab I have about 90 records ...
0
votes
1answer
16 views

How to implement in upstart that a service is preventive restarted every x hours?

I have a component --- started with upstart --- with a bug. The bug causes the application to freeze and unfortunately, it does not crush. As a temporary walk-around, I want to force the service to ...
7
votes
3answers
12k views

How can I setup a Mail Transfer Agent?

I intend to use mutt to send automated emails via cron or at with attachments to my gmail address when particular events happen on my Ubuntu server. Currently, mutt cannot send email to external ...
0
votes
3answers
95 views

Run rkhunter regularely on a desktop system

I want to get a warning on my desktop when rkhunter finds something odd on my system. I whitelisted some files and dirs that seem ok in /etc/rkhunter.conf so I get no warnings anymore. Now I want to ...
0
votes
0answers
17 views

pmcmd not working with Ubuntu crontab or gnome-schedule

I have scheduled a shellscript which interns calls an informatica workflow with PMCMD command. when the script executed manually, it is starting the workflow properly but when the workflow is ...
1
vote
0answers
182 views

unattended-upgrades error: “/etc/cron.daily/apt: DB Update failed, database locked”

Ubuntu 14.04.1 LTS Since installing unattended-upgrades, the following error message is received daily: From root@xxxxx Thu Aug 28 06:36:06 2014 X-Original-To: root From: root@xxxxx (Cron Daemon) ...
3
votes
2answers
100 views

Performance loss after 30 minutes

This one's baffled me. I have Ubuntu 14.04, 3 days ago (2014-20-10) it started slowing down. I've reproduced it by opening gedit and then closing gedit, when the issue is active it hits roughly 2 ...
1
vote
2answers
17k views

Setup cron job to send email to a bunch of people on a regular basis

I want to send a fixed email reminder from my email address every Monday, Wednesday and Friday to a bunch of people. How do I go about setting this up using crontab? I have an email account on the ...
0
votes
1answer
15 views

Why am I getting this annoying log messages.CRON[17405]: (root) CMD every minute

I have configured rsyslog.conf file to store log messages to mysql but I am getting some annoying log message in my MySql table. which looks like this. Nov 3 14:48:01 username CRON[17405]: (root) ...
0
votes
2answers
27 views

Crontab unable to open google chrome

I have written a chrome extension that performs a task whenever it is available, and for that I would need the chrome browser open at all times. My idea was to have a check say every minute if the ...
-1
votes
0answers
15 views

How to run a java program on boot [duplicate]

I wrote some java programs which run continuously to do some maintenance work. But I need to start them individually by screen java MyProgram I want them to start automatically on boot. I have read ...
0
votes
0answers
32 views

Scheduled Cron Back up from EC2 to S3

I have created a script for scheduling sql back ups and store in Amazon S3. Below is the script that I used for taking backups. DATABASES="testdb" testdb_USER=root testdb_PW=root ...
1
vote
1answer
28 views

CronJob not working as expected

I generated a cronjob line for crontab -e with Crontab Generator: * */2 * * * curl http://www.example.com/cron.php >/dev/null 2>&1 I was expecting that it should run every 2 hours. But in ...
0
votes
1answer
20 views

Cron process sends email, where are these sent emails?

Ubuntu 14.04 I have an email process that sends an email via cron, using sendemail (which I believe is a Perl program that doesn't need an MTA). Where are these sent-emails stored? If they are stored ...
3
votes
3answers
3k views

Ubuntu 14.04 not running Bash scripts in /etc/cron.daily

I have a few scripts (that currently run in a CentOS system) I have moved to a new Ubuntu 14.04 system. These scripts are in the /etc/cron.daily to run once a day. These scripts are to run at the ...
-1
votes
1answer
35 views

Launch a .desktop file from boot

I have a .desktop file on my desktop that launches a html page. I need the .desktop file to run from startup, what would be the best way to do this? I have tried crontab and also the startup ...
0
votes
0answers
36 views

crontab and running nmcli in a script

I am trying to come up with some way of making a persistent VPN connection, so if it drops (as it does from time to time) the connection will be remade. I though using crontab would be the best way to ...
-1
votes
1answer
2k views

Cron job every second

How can I run a PHP script every few seconds in Ubuntu Server? (bonus: How can I run random within the cron script, e.g. every 3 seconds + random(3 seconds) )
0
votes
1answer
22 views

Cron emails no longer going to local 'chuck' account

Ubuntu 14.04 installed as a VM on a machine that sends emails, with attachments, via Perl 5.18.2. That part works because Perl talks directly to the SMTP server. Let's call the machine name ...
2
votes
3answers
3k views

cron.daily seems to run but doesn't log any activity

We have a number of scripts setup to run in the /etc/cron.daily directory - some of them show evidence of being run at about the right time (files are archived/compressed and truncated), but others ...
154
votes
31answers
222k views

Reasons why crontab does not work

Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that: wrong crontab notation permissions problem environment variables This community wiki aims ...
0
votes
2answers
34 views

How to create a cron job to monitor the status of a port ?

I am trying to create a cron job that would allow me to monitor the status of a particular port and send out notification via email while it changes from listening state to anything else.
1
vote
0answers
27 views

Reading Cronjob Output [duplicate]

I have a task setup to run on my cronjob where I need to read the output. What I need from the output is the starting character (let's say A) and the ending character (let's say Z). A helps me ...
1
vote
2answers
123 views

Cannot run bash script from crontab when it works from command line bash

I have a strange problem of being to able to run a bash script from commandline but not from the crontab entry for root. I am running Ubuntu 12.04. * * * * 1-5 root ...
1
vote
2answers
65 views

Schedule a large download to resume everyday in a specific time-span of the day?

I want to schedule a large download to occur at night, between 12AM and 5AM. Everyday at 12AM wget should automatically pick up where it left the night before, and at 5AM, it should automatically ...
0
votes
2answers
1k views

Crontab and sSMTP

My server is Ubuntu 12.04.3 Cron jobs are working fine. I can send emails through command line, either using mail, ssmtp or sendmail. I have set the correct email address on top of the crontab -e ...
2
votes
2answers
185 views

Cron Job Creation

Okay, so I have had a quick look at the answers posted on this question and re-formulated my cron job. So, let me break this down as clear as I am able to: PC/OS | Shell Info I am currently running ...
4
votes
5answers
3k views

Notify-send doesn't work from crontab

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 ...
0
votes
1answer
64 views

shutdown 5:30pm every day

for a five thirty pm shutdown, should I change this: 30 02 * * * /sbin/shutdown -h now to: 30 17 * * * /sbin/shutdown -h now see also: Crontab Shut down command didn't work
4
votes
1answer
2k views

Disable daily anacron mail updates

Every day, I get the following mail delivered by postfix: From: Anacron <[email protected]> To: [email protected] Subject: Anacron job 'cron.daily' on name Content-Type: text/plain; ...
0
votes
0answers
21 views

Auto Update Even When Laptop Lid Is Closed

I am trying to follow this guide for auto updating Ubuntu. I am using the Advanced Aptitude option. My problem is that I am trying to do it on a laptop and cron doesn't work when the lid is shut. I ...
1
vote
2answers
4k views

Why my weekly anacron job is not executed?

I'd like to use anacron for a weekly job on Ubuntu 13.04. Here's my /etc/crontab: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to ...
1
vote
2answers
84 views

How to make crontab email me with output?

How can I make crontab email me with the output of its jobs? I have MAILTO=[email protected] above the jobs, but it doesn't work. I know I need to use something like Postfix or Sendmail but for ...
0
votes
1answer
59 views

Chkrootkit not producing a log file

This is the line from my crontab However, the log never gets sent to me..and when I check the log it is empty. I have tried Chkrootkit from the terminal and it runs OK. What am I missing? 30 09 * * ...
15
votes
5answers
29k views

How do you set the timezone for crontab?

I have set up ACPI wakeup so my laptop wakes up at a certain time each morning. The timezone for this is UTC. I want to set up my crontabs also using UTC so they fit with the wakeup alarm. How do ...
0
votes
1answer
37 views

git push script, only if difference

I've found some nice questions illustrating how one would write a script automating git push/pull with cron here and here, but I want to elaborate on that slightly. I only want to push/pull if there ...
0
votes
0answers
13 views

truecrypt in bash script called with crontab

I have a bash script that uses truecrypt to mount a volumn. The command is the following: RESULT=$(truecrypt $FILE 2>&1); When I execute the script with bash script.sh I receive the ...
1
vote
1answer
40 views

Question about CRON trim weekly

I have got samsung SSD and so TRIM is on automatically. However I am bit confusing about how TRIM cron weekly starts. According to cat /etc/crontab it says that CRON weekly will start at 6:47am (odd ...
1
vote
1answer
22 views

How do I change my cron loglevel to 7 from default value 1?

> man cron, tells me that the default log level for cron is 1; i.e. cron "will log the start of all cron jobs." I want to set that to 7, so I checked in all the wrong places, starting with the file ...
5
votes
3answers
772 views

Why is this rsync + ssh cron job giving me 'Permission denied (publickey)' errors?

I make frequent backups to a local drive which I want to sync daily to a remote server. The target server is configured for SSH key (no password) access only. Since my primary SSH key for that server ...