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)

132
votes
5answers
181k views

How do I set up a Cron job?

How do I add Cron jobs in Ubuntu?
0
votes
0answers
26 views

How to configure cron

I´m very confused trying configuring cron. I have a file named "crontab" in "/etc/crontab" which I edited to show (I want a daily task at 2:00 AM) As it claims is the "system wide crontab" # ...
0
votes
0answers
16 views

Problems running tcpdump with cron

I tried to create some simple scripts so I could have tcpdump stop and start daily with the date as the filename for logging purpose. I made two things to do this killDump-- kill $(pidof tcpdump) ...
4
votes
2answers
2k views

Programmatically sync dropbox without daemon running

I would like to 'manually' force dropbox to sync at certain times (eg at regular, daily intervals using cron, as part of a larger backup script). My goal is to substitute the dropbox daemon with ...
0
votes
0answers
9 views

CRON @reboot vncserver?

Is there any reason per-user cronjobs running vncserver @reboot wouldn't run? When I reboot the machine and look into /var/log/syslog, I see the jobs being run, then cron saying (CRON) info (No MTA ...
0
votes
2answers
16k views

How to set a cron job to run a shell script?

I had set a cron job: 20 * * * * /usr/bin/sh /home/lucky/myfile.sh The main problem is that at the schedule time, there is an error: "mail have sent to /var/spool/mail/lucky". The contents of ...
2
votes
2answers
18 views

Cron : How to delete directory via cron

I have allready installed cron and here it is 1 0 * * * rm -R /path/to/my/folder/$(date +'%Y-%m-%d' -d "yesterday") I want to delete every day folder with "Yesterday name" LIKE "2014-12-14" ...
14
votes
7answers
59k views

How to run scripts every 5 seconds using cron?

I have a script that needs to be run every five seconds. I know that cron can do tasks by the minute, but is there a way to run something every second?
0
votes
0answers
28 views

Crontab wont run this script!

I am trying to run this script as a cron job to enable a weekly back up of my mediawiki site. Running on Ubuntu server 14.04. It simply will not run. The scipt is running from the root folder of the ...
0
votes
0answers
15 views

reprepro - Is there any chance to enter the passphrase via bash-script?

I use "reprepro" for getting the latest Debian packages out of my local repository, which works fine manually. Now I need to automate this process through a cron job but the reprepro passphrase is a ...
15
votes
3answers
24k views

At what time does cron execute daily scripts?

If I place a shell script in /etc/cron.daily/, at what time of the day will it be executed?
0
votes
0answers
5 views

munin send mail about permission denied to munin-update.log

I have install munin, but CRON send me mail about an error: Can't open /var/log/munin/munin-update.log (Permission denied) at /usr/share/perl5/Log/Log4perl/Appender/File.pm line 103. but the ...
0
votes
1answer
20 views

Crontab weird extensin error Unable to load dynamic library '/usr/lib/php5/20121212/peacjson.so'

I am wanting to find out how I might get to the bottom of a repetitive error that is being e-mailed to me every 9 and 39 minutes past the hour: PHP Warning: PHP Startup: Unable to load dynamic ...
2
votes
3answers
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 ...
0
votes
1answer
20 views

crontab not running simple job

i have a very simple command in cron that should reboot my system everyday. I modified crontab in root with the following: sudo crontab -e I then added one line to the end of the crontab: 0 1 * * ...
0
votes
0answers
15 views

Backup database with mysqldump

Hello i use mysqldump with crontab for save my database each hour but after one day i have 24 files What is solution for auto delete if more 5 files ? And what is chmod for folder backup for security ...
0
votes
1answer
25 views

Shellscript creating directories in wrong direcroy when running from crontab

I have written the following code which will create directories with name format "nowt_hour_minute_second". In that directory another text file will be created with the directory creation time. Now I ...
2
votes
1answer
79 views

Cron jobs are disabled on clean installation of 14.04

I have a clean installation of Ubuntu 14.04 and in my /etc/cron.daily/ I see *.disabled files: -rwxr-xr-x 1 root root 15481 Apr 10 09:04 apt.disabled -rwxr-xr-x 1 root root 314 Feb 17 2014 ...
0
votes
1answer
21 views

Launch url to start a script like a cronjob?

I have a website on mutualised hosting (server A). I need to run every minutes a script, I just need to go to http//www.mysiteserverA.com/run.php I searsch a solution automaticly run this script every ...
0
votes
0answers
13 views

rsync never terminates and makes Tb size snapshot directories

I have a cron job that runs rsync every day to download data from a server. It was working fine until the space allocated for me in the server was changed (probably increased). It happened as I was a ...
0
votes
1answer
22 views

What schedules logrotate?

I'm working on the program which creates a big log file. I want to handle it with logrotate. This is a configuration I put to /etc/logrotate.d/: /var/log/myproject.log { hourly maxsize 1 rotate ...
2
votes
2answers
6k views

Crontab error “No crontab for root”

when I write crontab -e command in terminal, I get this error message: no crontab for root - using an empty one 888 I don't know what '888' is meaning? Config file of crontab /etc/crontab: # ...
1
vote
3answers
52 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
23 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
15k 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
19 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
38 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
131 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
37k 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
30 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
18 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
20 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
13k 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
112 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
22 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 ...
3
votes
0answers
239 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
130 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
18k 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
19 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
36 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 ...
0
votes
0answers
53 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
31 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
28 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
39 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
44 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
26 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 ...