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
2answers
1k 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
41 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
55 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
196 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
65 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
27 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
318 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
136 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
116 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
153 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
218 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
51 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
153 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
46 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 ...
2
votes
2answers
129 views

Cannot run a GUI app from cron

After doing a "sudo su -" on an Ubuntu 12.04 notebook I did a "crontab -e", added this: * * * * * env DISPLAY=:0.0 /usr/bin/gnome-calculator and waited for minutes. Nothing Happened. I don't have ...
0
votes
0answers
40 views

Why is my server (12.04 LTS) catching up on a missed cronjob when woken over LAN?

... or what else is happening here? My homeserver running 12.04 LTS server is running on a wake/sleep schedule. I have a script "hibernate-starter" being run by root's crontab at specific times. The ...
1
vote
0answers
47 views

syslog time is not matching cron string setup

I am running many cronjobs in my server. When I was checking the syslog file to see the cron timing, it's completely not matching. Can someone help me to understand. syslog May 23 00:00:01 xxxxxx ...
1
vote
1answer
585 views

Why did /usr/lib/php5/sessionclean run 50 times simultaneously on my 14.04 system?

When I sat down at my Ubuntu 14.04 system this morning, the root cron job /usr/lib/php5/sessionclean was running over 50 times at once, producing 50+ copies of the following commands: root 8147 ...
6
votes
2answers
2k views

Why do I see a CRON session opening and closing every hour in /var/log/auth.log?

I am quite fresh with Linux as a whole, so this may be a silly question - but I would still like to know the answer This morning when I look at my /var/log/auth.log (which I've been told to make a ...
1
vote
1answer
1k views

Cannot get ntpdate cron to run

I'm trying to have a daily cron update the clock on my 12.04 server. I've followed the instructions here, but it still doesn't run: After a few weeks, the clock once again is off by a few seconds. ...
1
vote
1answer
152 views

How to execute livestreamer command with cron?

So the other day I installed Ubuntu 14.04 LTS at home in a partition next to Windows 7. As I'm not able to be at home to watch the Sailplane Grand Prix live as streamed on YouTube, I decided to use ...
0
votes
0answers
132 views

Full Automatic Scheduled Download in Lubuntu

As the Question Said,I want to schedule daily download at night -when I'm absent- I've doing this in past (windows xp) by using wake up feature in bios and in idm set schedule task and when arrived at ...
2
votes
2answers
344 views

How to schedule a command to run a few seconds after startup?

I was trying to use @reboot /my/script in cron to run a script on a 10.04.4 VM running in VMware Fusion top print ifconfig to a file on a shared directory, which is /mnt/hgfs/somedir. It didn't work ...
1
vote
1answer
504 views

Curl request from cron job is not working,but works manually

I have a cron job that runs every minute and makes a curl request and i have verified that using grep on the syslogs. But the curl is not happening somehow and moreover i have a small echo statement ...
0
votes
1answer
232 views

update from 12.04 to 14.04, cron stops working

I am having trouble of using cron after updating from 12.04 to 14.04. here is my log: May 8 11:00:01 imanqasrina CRON[30716]: (sicksand) CMD (bash $HOME/bingwallpaper/bingPaper_v1-0.sh) May 8 ...
0
votes
2answers
30 views

Keep backing up (copying) the same file to a new folder

I am saving a stream in my HDD. I'd like to copy the file periodically into a subfolder backup such that the older versions of the the file are not deleted. Simply put Assume the original file is ...
2
votes
0answers
112 views

Tiger: `rtm` is listening on socket XXXX

On my Ubuntu serve 12.04 LTS, Tiger is reporting a lot of stuffs like this: OLD: --WARN-- [lin002i] The process `rtm' is listening on socket 60404 (UDP) on every interface. NEW: --WARN-- [lin002i] ...
0
votes
1answer
1k 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
2answers
80 views

Why this script doesn't work in cron and generates a empty output?

Why this script doesn't work in the cron for root or other user and generates a empty output ? /tmp/test-1.log --------------- #!/bin/sh /bin/echo this is test-1.sh /bin/date "+%FT%T" Permissions ...
2
votes
1answer
136 views

Simplest MTA mail setup for a desktop to receive (ana)cron emails

Ubuntu (12.04 LTS) doesn't seem to install any sort of mailer by default. Everybody seems to recommend installing Postfix. I am familiar with Postfix, which I use on several "real" servers. But it ...
1
vote
2answers
84 views

Intermittent crontab problem

My crontab entry intermittently fails to find scripts in my user's home directory. The crontab entries run exactly on schedule as specified, and occasionally the script runs correctly, but mostly it ...
1
vote
0answers
194 views

Allow user to run programs as root without password. Would it be the correct solution to my problem?

I have a server which I need to be running certain programs permanently; I'm having problems with two of them and I'm not sure if the solution I've found would be the correct one, so I ask for opinion ...
0
votes
1answer
193 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 ...
0
votes
0answers
60 views

Starting services with custom xsession

I'm new to ubuntu. I've accomplished making chromium start at boot with xsessionrc file, but now I want to get a screenshot of the desktop every minute (which is just chromium basically). I've ...
2
votes
1answer
110 views

How to get a timestamp on rsync output

I have an hourly crontab job @hourly rsync -avc --delete /DirA/ /DirB/ > /home/job.txt However when I check the logbook I see no timestamps. How can I get timestamps in the log so that I can be ...
3
votes
1answer
153 views

How we can copy one file from one server to other in cron

Can anybody let me know how we can copy a file from one server to another in a cron. I know about scp but how we use it in a cron, since we need to pass the password. Edited I found this link Expect ...
1
vote
2answers
4k views

Shell script issue: cron job script to Restart MySQL server when it stops accidentally

I have this script, I am using it to setup CRON job to execute this script, so it can check if MySQL service is running; if not then it restart the MySQL service: #!/bin/bash service mysql status| ...
0
votes
1answer
655 views

Ubuntu 14.04 kworker hogging cpu; fix didn't work

Fresh install of ubuntu 14.04 on a touchscreen Toshiba Satellite laptop with intel graphics. I tried to follow the fix here: Why does kworker cpu usage get so high? It didn't work; my problem seems ...
1
vote
0answers
134 views

PPTP won't connect from a cron command

I'm trying to work out why my VPN won't connect when the command is initiated from a cron triggered script when that same script and command otherwise work as expected. I have a remote server which ...
0
votes
1answer
50 views

Command to find how much data was transferred from USB

How can I create a cron job that runs every minute and logs how much data was transferred by USB? Ideally I want log of amount the data in bytes transfers done. For example if i tranferred 4mb file ...
0
votes
1answer
866 views

Why crontab doesn't want to execute the job as root?

I'am using the Ubuntu 14.04 (Trusty) version and i get a problem with my crontab (it was working before 13.10) Here is the command line /usr/lib/cgi-bin/awstats.pl -config=www.skrik.fr -update ...
0
votes
0answers
35 views

crojob not recognizing ip command

I have this script to gather data trx rates. If I run this script normally, it executes fine. However, If I add this to cronjob to execute every hour, I get an error in the /var/log/ SERVER=`hostname ...
0
votes
0answers
119 views

wrong file owner

Syslog displaying the following: 04/06/14 05:16:01 PM loren-laptop cron[986] (system) WRONG FILE OWNER (/etc/crontab) /etc/crontab displays: Owner Me Is this a problem that requires fixing?
0
votes
1answer
64 views

Crontab backup not working (not generating log)

I want to run a script every day at a certain hour, so I saw that I could use cron for that. Following the tutorial, I edited the crontab file like this: crontab -e and added: 26 13 * * * ...
0
votes
0answers
49 views

Why cron.weekly started apt-xapian-index at 11AM instead of between 2-4AM?

I have redifined staring hours in /etc/anacrontab and /etc/crontab like following: --- my changes: 17 * * * * root cd / && nice run-parts --report /etc/cron.hourly 25 3 * * * ...
0
votes
1answer
56 views

Execute script when disk space is low

Is there a smart way to execute a script when disk space is low? I know I can manually check disk space, but it seems like a common problem to want to delete log files when disk space is low (for ...
1
vote
5answers
1k views

crontab not running as root

Mysql backup scripts not running as root crontab - help I'm trying to run a crontab as root but the script is not running successfully. I can see in syslog that the script is executing but it does ...
0
votes
0answers
45 views

Anacron and suspend

Does an cron task, that is run with anacron run even when my system is suspended? I know that anacron will run a job regardless of whether my system is on or off, but I thought that the jobs get ...
0
votes
0answers
53 views

Poor battery life: cron jobs running even in suspend

I was trying to figure out why my battery was dying out really fast even when in suspend mode. I noticed that my cron jobs run even when my laptop is suspended. I do not want this behavior. Cron ...