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
1answer
117 views

How can I start a shutdown with cron,only if no download is in progress?

I would like to shutdown my computer half-past twelve every day and can do that with "echo "30 0 * * * /sbin/shutdown -h now" > myrootcron.sh",but what if I want to cancel that shutdown or leave it ...
2
votes
1answer
82 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 ...
3
votes
1answer
235 views

Ubuntu 14.04 and playing songs from cron

I recently upgraded my computer to Ubuntu 14.04. After the upgrade the system no longer plays the few songs I had it play via crontab. The crontab lines look like so: 0 9 * * 1-5 ...
1
vote
1answer
64 views

Problems with MAILTO setting: server doesn't sent cron's e-mail

I have Ubuntu 14.04 with Postfix mail server. Php/apache can send e-mails. But i don't resive any messadge from cron. Here my setup: MAILTO=crantisz@gmail.com */2 * * * * wget -o /home/user/out.html ...
1
vote
1answer
124 views

Change system volume using crontab & pactl

I am trying to change Ubuntu 14.04 system volume using crontab. I am using following command: pactl set-sink-volume 1 75% Which works fine when I use it in terminal or when I run script which ...
0
votes
1answer
314 views

What is the default timeout value for curl when used as command on terminal?

have searched a lot to find out default timeout value of curl. All suggests how to set timeout limit for curl. But Can anybody please suggest what is the default value of curl command timeout time? If ...
0
votes
1answer
37 views

running a tar command eats all resources

I am running a Rails application on my ubuntu 12.04 server. I have set up a cron job to take backup of all files uploaded to my application every morning at 2 am. It is a lot of files (around 900 mb). ...
0
votes
1answer
102 views

Alternatives to Cron

I'm doing a server running Ubuntu Server 12.04 and Apache. The users have continuous updates in the dinamic pages through a Java script, downloading JSON files through Ajax request to server. All the ...
1
vote
1answer
367 views

Crontab not executing jobs Ubuntu 14.04

I am trying to run bash script as a cron job every 15 minutes. The bash script simple calls a Java program. I made an entry in crontab to run the file every 15 minutes and saved it but it would not ...
1
vote
3answers
155 views

Not able to run sed on bash script

I am working trough some legacy code which does not work, I came across a part that is causing problems. I was hoping some one could help me out and fill me in on what is the exact functionality of ...
1
vote
2answers
93 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 ...
1
vote
2answers
138 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 ...
0
votes
0answers
37 views

Reg: Cron job is not running

I have set my cron jobs in linux ubuntu. Cron is not running and even already set my mail id to test whether cron is working or not.Its not luck for me. How to fix this issue.
1
vote
0answers
137 views

Crontab not executing script with cURL

I have a cron that's set to run every ten minutes that works fine if I execute the file manually by entering php register.php But, my cron will not execute this file once it includes anything cURL ...
1
vote
0answers
47 views

Cron, xconf-query and Xubuntu 14.04

I have updated my Xubuntu to the 14.04 version. Unfortunately, I am experiencing a problem. I have a script, named earth, updating the wallpaper of my desktop. Here is the code #!/bin/sh nice -n 19 ...
5
votes
3answers
1k 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 ...
0
votes
1answer
87 views

Is there a programmable way to tell if the screen is locked with the new Unity interface?

I have lots of stuff in my crontab, including some that talks to my screen. If I'm not there for it to be notifying, I don't really want it to run. Is there a way I can check to see if the computer ...
1
vote
1answer
678 views

Who runs scripts inside /etc/cron.hourly if anacron is enabled?

I've read that if anacron is enabled cron doesn't run the scripts inside cron.weekly/hourly/daily/hourly, as not to run them twice. So anacron takes responsability on that folders. However anacron ...
3
votes
0answers
240 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) ...
0
votes
2answers
52 views

Crontab command does not function properly

I have the following crontab entry to automate copying of my files to separate W/S in the network. However, it does not copy the files but produce the log file. here is the file contents #! ...
4
votes
2answers
447 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
299 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
182 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
77 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
48 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
25 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
1answer
67 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
197 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
154 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
125 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
315 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
246 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 ...
3
votes
3answers
4k 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
53 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
120 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
73 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
29 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
120 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
72 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
807 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
317 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
26 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
107 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
111 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
18 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
57 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
228 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
153 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
53 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
41 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.