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
votes
1answer
85 views

How To Run A Shell Script Again And Again Having X Interval Of Time? [duplicate]

I have a shell script in my Ubuntu Server 14.04 LTS at ./ShellScript.sh. I setup /etc/rc.local to run the shell script after boot but before login using below code. Run this: sudo nano /etc/rc.local ...
0
votes
1answer
16 views

Unable to execute expect script via cron even with the permissions set to 777

I created an expect script that won't seem to run when called by cron. I included the full path in cron when calling it as follows. * * * * * /usr/local/sbin/checkForRemoteTasks ...
0
votes
1answer
29 views

Tell me where is mistake in anacron task?

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 ...
0
votes
2answers
9k 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 ...
0
votes
1answer
26 views

Scheduled tasks won't run simple command

The command below works fine in terminal but won't run using the gnome scheduled tasks. pacmd set-sink-volume 0 42768
1
vote
1answer
14 views

Is it possible to a crontab file containing 1k+ lines of schedules?

I'm planning to create scheduled tasks and I want linux to handle those tasks using crontab. Note: some tasks have different schedules and some are the same [crontab file (schedule.cron)] * * * * * ...
1
vote
1answer
61 views

unwanted periodical restarts

A couple of weeks ago, I thought I solved the cron job problem which is responsible for unwanted periodical restarts in 60 mins. I used acpi=off line for this. But now the problem occurs again with ...
13
votes
5answers
12k views

Cron.hourly won't run

Ok, So I've made my script, I dropped it in /etc/cron.hourly then I chmod 777 the file but it won't run (automatically). If I manually run it, it works fine. Do I need to do anything else?
0
votes
1answer
400 views

node.js app runs from command line but gives errors when run from cron job on reboot on ubuntu 14.04 LTS

When starting my app manually using forever, it works fine. It runs on localhost:8080 and nginx does the routing. When using a cronjob my starter.sh script runs but in the forever log I get an error. ...
0
votes
1answer
171 views

Upgrade to Kubuntu 14.04 Hangs at Stopping Cron

I just attempted to upgrade from Kubuntu 13.10 to 14.04 using the Muon Update utility, but after downloading all required files, the update process stalled with the message "Cron: Stopping..." After ...
1
vote
3answers
77 views

Starting Rhythmbox via crontab

I'm getting tired of this issue now, because every version of Ubuntu needs to be treated in another way, but in 14.04 I don't know what to do anymore. My problem: My PC is starting automatically ...
0
votes
2answers
529 views

Set server timezone but not working with crontab and phpmyadmin

TimeZone is not working properly I am using linode server running ubuntu 12.04LTS. My Question is when i configured timezone by using dpkg reconfigure tz as IST ASIA/Calcutta. It shows correct ...
2
votes
1answer
2k views

Running two commands in crontab

I have this line in my crontab file */1 * * * * espeak 'foo' && espeak 'bar' But only half of it, first command gets executed every minute. While when I write this in the terminal it works ...
1
vote
1answer
3k 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
0answers
14 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 * * ...
4
votes
1answer
61 views

Vixiecron doesn't allow disabling of emails, how can I disable cron emails globally?

Every time the cron runs there are some sendmail processes being created which take our machine to huge high loads. We have chased this problem down to cron and sendmail. Adding MAILTO="" on top of ...
1
vote
2answers
40 views

printf, redirection, crontab

I'm having trouble redirecting C printf statements to a file with a program running as root. I have a program with several informational printf statements and other libraries which print errors via ...
3
votes
1answer
42 views

Cron job not working properly on start up

Thanks for reading this. I have created a bash script to backup my databases. The script will create a directory for the day then create a backup file for each database within that directory. It ...
1
vote
2answers
172 views

bash script to back up file [closed]

I have a few files to be backed up. I need a script to check line number of a file and if it exceeds, say 8000 lines, it will simply zip it and name it with date prefix format. I need your help.
8
votes
4answers
4k views

“Backup Intervals” in rsnapshot.conf?

A simple question about rsnapshot. In order to perform daily backups I'm going to add lines to cron in my Ubuntu. Then, why do I have also these lines in the rsnapshot.conf ? ...
0
votes
1answer
29 views

How can I configure a second SSH key + user for a single server?

I have a SSH key which is passphrase-protected. Authentication to the server is by SSH key only, password authentication is disabled. Both the server and my desktop run Ubuntu 14.04 and authentication ...
0
votes
1answer
79 views

How to launch interactive shell script in bash hourly with cron?

I put this line in the crontab: 1 * * * * DISPLAY=:0.0 /usr/bin/gnome-terminal -e /home/user/Desktop/mltpl The script is executable. If paste that command in the terminal--that is, the string ...
2
votes
2answers
155 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 ...
0
votes
1answer
26 views

Crontab does not work

I have 2 crontab commands. The cron below works fine: 00 19 * * * cp -a /home/kmportal/VirtualBox\ VMs/cyn.in-disk1.vmdk /media/windowsshare The cron below does not work after I add the time ...
0
votes
1answer
30 views

Using unattended-upgrades or cron for automatically updating packages from different sources?

I'm running Ubuntu 14.04 + XBMC on a HTPC and now I want to setup automatic updates on this machine. On top of the normal Ubuntu sources, I have also 3 other sources installed, of which I want to ...
0
votes
0answers
5 views

Teradata BTEQ on ubuntu

I am trying to set up a cron job server utilizing BTEQ to run our daily builds. I installed pretty much everything I could find on the TD developers site via alien as the packages are rpm, but I didnt ...
0
votes
1answer
63 views

Cron job not running - postfix/sendmail error

Here is my content of sudo crontab -e @hourly /home/userName/ntpdate.sh The content of my script (ntpdate.sh) //.25 is my ntp server echo "Current time is $(date), " >> ...
1
vote
1answer
100 views

How to tell cron to find paths to tools?

Is there a way to indicate to cron 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 ...
2
votes
1answer
47 views

cron does not work

I read about cron. I edited it by running crontab -e and I added this line: * * * * * php /var/www/createFile.phpWhen I run ls /tmp/ I do not see any file create by my php script. Why does not it work ...
0
votes
1answer
52 views

rtcwake cron does not work

I intend to put my computer to sleep every night and make it wake up again next morning. I found that rtcwake would serve my purpose. However putting it in the crontab does nothing. Following is my ...
1
vote
1answer
42 views

How to schedule an irregular backup script requiring user confirmation

I have a backup script which requires user interaction. I would like to schedule it to run, say, once a week. The constraints are that (1) the computer boots straight into Gnome and is turned off ...
0
votes
0answers
15 views

What is the difference between postfix and mailsutils?

I am attempting to set up an AWS EC2 with a simple mailing service for my crontab. And I have postfix set up, but when I used the "mail" command it did not work. So I installed mailutils as ubuntu ...
1
vote
0answers
26 views

Which tasks in “Scheduled Tasks” (gnome-schedule) use anacron versus cron?

I am trying to run a command once a day, but my machine is not always on. anacron says it's meant for such purposes, but I prefer to use the Gnome Scheduled Tasks GUI program. If I schedule a task to ...
0
votes
1answer
19 views

Start a transmission-gtk using a cron job

I'm trying to start my torrent client using a cron job. Following is the job I added to crontab file(contab -e) 00 20 17 07 * transmission-gtk I waited for the time but transmission-gtk didn't ...
1
vote
2answers
59 views

Crontab Instances

I have been doing some research on scheduling tasks and what not. I came across the crontab command function. Is crontab a file that is created or is it a command? If it is a file, then how many can ...
0
votes
0answers
15 views

Doubt : locate command: reschedule to every 2 mins

Will mlocate cron scan complete file system in scheduled time? Or will it just merge databases whatever files/folders added between scheduled time? I am planning to reschedule mlocate cron job to ...
0
votes
2answers
402 views

Cron Job Not running after proper setup

So I created a cron job as shown below: GNU nano 2.2.6 File: /tmp/crontab.uNoEXy/crontab # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be ...
1
vote
3answers
953 views

Who is sm-msp-queue and how does he/she/it flood my /var/log/syslog?

I run Linux BeagleBoard-xM 3.12.5-armv7-x10 #1 SMP Fri Dec 13 03:06:20 UTC 2013 armv7l armv7l armv7l GNU/Linux and my /var/log/syslog gets flooded by messages like Jan 11 10:21:09 BeagleBoard-xM ...
19
votes
4answers
27k views

Where is the user crontab stored?

Since upgrading my user's crontab has been wiped out. This is not the first time this has happened this year and it's a pain restoring it each time. I'd like to be able to back up the crontab for my ...
2
votes
2answers
127 views

What does this (root) CMD line in system.log mean? Why is it there?

What does it mean? (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin ...
2
votes
2answers
70 views

sending email from cron with correct format

I am stuck when sending email in correct format from cron jobs executing my php script which fetches records from mysql database. i have a php script which fetches records from database and renders ...
1
vote
1answer
65 views

Run the script file after 5 or 10 min after restarting the system

I have created a ruby script file that checks the connection present or not. For example checking port 22 is opened or not. Firstly I tried with cron job as follows @reboot find ...
139
votes
31answers
198k views

Reasons why crontab does not work [closed]

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 ...
1
vote
1answer
42 views

Error starting python file using cron

I'm trying to get a python file to run every 2 mins, I'm using the following cron command but the script never runs. Would anyone know what the possible errors could be related to starting a python ...
0
votes
2answers
2k views

Cron not working

Wrote a short shell script "wallch.sh" to randomly change my desktop background: DIR="/home/user/Wallpapers" PIC=$(ls $DIR/*.jpg | shuf -n1) FIL="file://" gsettings set org.gnome.desktop.background ...
0
votes
1answer
13 views

cronjob to remove directories that are smaller than x in size

I want to run a cronjob every 6 hrs that deletes directories smaller than 200MB. I know dh command would do the job, but i'm not sure how to use the command. Any help is appreciated.
12
votes
7answers
50k views

How to run scripts every 5 seconds using cron?

I would like to know how to run a script every 5 second. I know that cron can do every minute. How do you get intervals below that?
2
votes
0answers
56 views

Can I set up a cron job on Ubuntu Phone

I've been looking around, and can't find if Ubuntu Touch can run cron. So my question is: Can it? Also does it have a standard set of bash utils installed?
0
votes
1answer
34 views

Crontab not run job and change job

I've set 'Crontab' with root user and -e key but Cron is not running my jobs and after little time, my job is removed and replaced with other text!!!! The jobs set: # m h dom mon dow command ...
2
votes
1answer
58 views

Why is my cron script to dump a MySQL database not executed?

I have the following cron job: * * * * * /home/db_backups/test.sh which runs fine and is executed every minute. If I check with sudo grep \(CRON\) /var/log/syslog I get the following: Jun 23 ...