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)

3
votes
2answers
231 views

How to start a Firefox from cron?

I need to run a Java applet from a Firefox. The problem is, I need to run this Firefox from a cron. If I run from the command line and its work fine, but when put the command in the cron it failed: ...
-1
votes
1answer
128 views

How To Run A Shell Script Again And Again Having X Interval Of Time In Root? [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. To run run it boot write this ...
0
votes
1answer
18 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
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)] * * * * * ...
0
votes
0answers
15 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 * * ...
3
votes
1answer
44 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
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 ...
0
votes
1answer
33 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 ...
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.
0
votes
1answer
80 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
176 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 ...
1
vote
1answer
63 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 ...
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
101 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
48 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
68 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), " >> ...
0
votes
1answer
55 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 ...
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 ...
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
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
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 ...
1
vote
1answer
43 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 ...
2
votes
2answers
72 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 ...
1
vote
1answer
43 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
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.
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
59 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 ...
0
votes
0answers
41 views

Cron Doesn't run the job

I am trying to add a job to cron using sudo crontab -e Using * * * * * root /usr/bin/getmail doesn't work. Ubuntu version is trusty I get confirmation crontab : installing new crontab. I ...
1
vote
2answers
22 views

crontab with espeak doesn't work when sound card is busy with google hangouts

There may not be a solution to this, but here's the problem nonetheless :) I'm on Ubuntu 14.04, using latest Chrome as my browser My sound card is busy being used by Google Hangouts My crontab is ...
2
votes
3answers
93 views

Cleaning up yesterday's files via script

I would like to run a cronjob that ran every morning to move the files that were created on the previous day in a specific directory to be moved to a folder that has been created with the previous ...
-1
votes
2answers
126 views

sendmail with cron job

a=$(df -h /mnt/smb | tail -n +3 | tr -s ' ' | tr '%' ' ' | cut -d ' ' -f 5) echo $a if [[ $a -ge 30 ]]; then cat /etc/diskspace/text.txt | sendmail test.gmail.com fi Hallo guys this is my ...
0
votes
1answer
24 views

Does duplicity detect when a Backup Is Already In-Progress?

Any time you schedule a recurring backup, it is always possible for a previously-initiated-backup to run so long that the next scheduled backup gets initiated before the previous backup completes. ...
1
vote
1answer
43 views

Understanding the at-command to schedule another command

I use cron to schedule things in Linux, but recently I discovered the "at" command. sudo apt-get install at I don't understand the scope from which this command operates: How would you schedule a ...
0
votes
0answers
22 views

Start Skype on boot with crontab [duplicate]

I includes these entries yet Skype don't manage to start on boot: @reboot /usr/bin/./skype @reboot /usr/bin/skype
1
vote
1answer
82 views

Editing Gsettings unsuccesful when initiated from cron

I must have a blind spot, but I cannot find what it is. I made a small python script that removes VLC from the sound menu. It runs perfectly in any way I run it from the terminal or from a launcher ...
-1
votes
1answer
27 views

difference between atjobs & atspool directory

when i was working with ubuntu 12.04 at command i noticed that there are two different directories /var/spool/cron/atspool and /var/spool/cron/atjobs . I want to know what is the difference between ...
0
votes
0answers
22 views

cron to email when a psql stops recording data

I have a PSQL setup and records data every 10 minute or less. The connection sometimes dies and it results is logging failure and I have no idea when that happens. I want to create a cron job to email ...
3
votes
1answer
120 views

Bash script runs fine, but not in cron

I have a script that's supposed to record a shoutcast stream for an hour, convert it to mp3, and then save it. The script runs correctly when I run it from the terminal, but I can't seem to get it to ...
0
votes
2answers
77 views

Cron doesn't execute one of the scheduled jobs

I'm using a lubuntu desktop, distribution Ubuntu 13.10, i686. This is my problem: in the job list scheduled by cron a job hasn't effect, but in /var/log/syslog its execution is traced. This is the ...
1
vote
1answer
51 views

Running a Screen instance of a program as non-root

I've got a dedicated server (Ubuntu 12.04, no GUI) set up to launch an instance of McMyAdmin and attach it to a screen instance every time I reboot the hardware. I have the command saved to root's ...
2
votes
2answers
61 views

cronjob output will not show in terminal

I've been trying to get the output of a cronjob to show in the terminal and I can't figure it out. Every minute I would like to run the script /usr/games/sl and have it output in the terminal, and ...
1
vote
2answers
49 views

Running shellscript with cronjob is making problems, executing manually not. Ideas?

I made a shell script called /home/root/cron_grads.sh (chmodded 755) on my server. In this directory are more grads-scripts like 500hPa_p0.gs (644). My main script creates a temporary file ...
0
votes
1answer
39 views

backup without overwriting old backups

I'm using Ubuntu server 14.04 to backup all data from '/mnt/test/ folder' to '/home/john/' with TAR and archive to stuff.tar.gz and to make it to backup automatical. I use cron to backup it every ...
1
vote
3answers
78 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 ...
1
vote
1answer
22 views

Stopped Jobs error upon logout

There are times when I attempt to logout of SSH and I get something along the lines of: There are stopped jobs Not knowing what this is, I end up force quitting putty with the exit button in the ...