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)

0
votes
0answers
11 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
0answers
24 views

Cron is not working as expected - Debian [on hold]

Hello guys i am having a little problem with the Cron. I want it to fetch some email every minute in application. Application is under /opt/redmine and command that fetches emails is bundle exec ...
20
votes
6answers
1k views

Repeat a command every x interval of time in terminal?

How can I repeat a command every interval of time, so that it will allow me to run commands for checking something or monitoring directories ? I don't need a script, i need just a simple command ...
0
votes
1answer
38 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 ...
1
vote
3answers
731 views

mplayer can't play audio from cron while ncmpcpp is playing simultaneously

I have set up a script, which executes an mplayer command, in order to play audio in crontab. It will be executed in a special set time, but this script can not play audio when ncmpcpp (a front-end ...
0
votes
1answer
45 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 ...
1
vote
2answers
272 views

Can't find where scheduled task is set

I have a production server running a scheduled task that I simply can't track down. It seems that it is running dbdump.bash on a daily basis, but none of the cron files have a reference to that or ...
0
votes
0answers
19 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
11 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
20 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 * * * ...
8
votes
1answer
6k views

Add lines to cron from script

Is there a way to add lines to a user's cron via script? I usually do it using crontab -e, but I would like to automate this task with a shell script.
0
votes
2answers
4k 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 error "mail have sent to /var/spool/mail/lucky" the contents of ...
0
votes
4answers
67 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
18 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 * * * ...
6
votes
2answers
1k views

what can be causing /etc/cron.daily/apt to hang?

Lately I've been getting a mail from the server every day, Subject Cron <root@host> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) Body ...
0
votes
0answers
10 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 ...
0
votes
0answers
12 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
23 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 ...
4
votes
2answers
1k views

NMCLI works in script when I run itdirectly , but not when run in CRON

This is under Ubuntu 11.10 I have a script that starts a PPTP VPN connection fetches a couple of files, then closes the connection. When I run this script from a terminal prompt it works perfectly; ...
9
votes
2answers
4k views

All commands in my crontab fail with “Permission denied”

crontab -e and crontab -l work just fine: $ crontab -l | grep -v '^#' * * * * * /usr/bin/env * * * * * echo 'Hello from crontab' However, I see two messages like this every minute in ...
0
votes
1answer
32 views

Not able to view a file using crontab

cat filename.txt displays the contents of the text file in the same terminal the command is executed. But In Crontab when I type * 14 24 3 1 cat filename.txt nothing gets displayed at the time ...
3
votes
4answers
2k views

cron.daily jobs not running

I created 3 daily cron jobs to run. Below are the three that are placed in etc/cron.daily rkhunter.sh #!/bin/sh ( rkhunter --versioncheck rkhunter --update rkhunter --cronjob --report-warnings-only ...
1
vote
1answer
23 views

Why do I get an error saying I must be privileged to use `crontab -u`?

I am trying to list all the cron jobs for all the users in my Ubuntu system using the following command: for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done Why am I getting the ...
0
votes
1answer
69 views

sm-msp-queue says: unable to qualify my own domain name (xxx) — using short name

Every 20 minutes, for days, sm-msp-queue (something related to sendmail, I guess) writes a message in my ubun that goes like that: unable to qualify my own domain name (ubun) -- using short name ...
1
vote
0answers
9 views

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

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 ...
0
votes
0answers
58 views

xprintidle doesn't work in cronjob. Why?

I have lxle (Lubuntu) 12.04 installed and I spent lots of time looking for working solution to make PC shutdown after some period of idle state. After checking many programs which haven't worked I ...
0
votes
0answers
36 views

Auto update in ubuntu 13.10 desktop

My question is very basic and foolish one.I installed ubuntu 13.10 desktop 32 bit. Now I want auto updates of security. I visited this Ubuntu help page. But I waited whole day to see whether my ...
1
vote
1answer
40 views

Command with backticks and percentages not running in crontab

The following crontab does not work: # TEST LINE DOES DOT RUN */1 * * * * /bin/echo 'test '`/bin/date +%Y-%m-%d` >> /tmp/test I also tried starting it with: SHELL=/bin/bash Update: I ...
1
vote
0answers
8 views

Any reason why Ubuntu's man page on crontab(5) is less informative?

Why is the man page for crontab(5) at manpages.ubuntu.com less informative than corresponding man page at linux.die.net? Compare The "sixth" field (the rest of the line) specifies the command to ...
1
vote
2answers
29 views

What does this mean in “crontab -e”?

When I run crontab -e, I see this bit: Notice that tasks will be started based on the cron's system daemon's notion of time and timezones. How to convert the cron's system daemon's notion of ...
0
votes
1answer
56 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 ...
98
votes
5answers
107k views

How do I set up a Cron job?

How do I add Cron jobs in Ubuntu?
8
votes
2answers
38k views

Script doesn't run via crontab but works fine standalone

I have a script that reminds me to restart my computer if uptime is more than, say 3 days (although its set to 0 days now just to check if the script is running as my computer has been up only over a ...
1
vote
1answer
46 views

Script not running in crontab, file not found

I need your help to run a bash script in crontab. As many other posts in askubuntu I'm facing the problem that a script that is properly running in terminal mode does not run in crontab. The error I ...
0
votes
1answer
44 views

Deja-dup cannot access Truecrypt volume when run from Cron

I have a deja-dup set up to backup into a mounted Truecrypt volume. It works fine but now I would like to run deja-dup in my own intervals via Cron (set up for my account): * * * * * env DISPLAY=:0 ...
2
votes
1answer
44 views

Using a cronjob to clean /tmp

Is it save to use bash script and a cronjob to remove all files in /tmp? Or should I do this differently for other reasons, maybe?
0
votes
1answer
155 views

Cannot run cron job for a php script

I want to run a php script using cron job on localhost my script is situated at - /opt/lampp/htdocs/rrugd/myscript.php now as opt is under root, i tried adding the cron job for root as well as ...
3
votes
3answers
2k views

unattended-upgrades not running, /etc/cron.daily/apt missing

I have automatic-upgrades installed and configured, but it never seems to run, because there are always security updates waiting to be installed when I check. ...
0
votes
1answer
529 views

Ubuntu VPS Automatic Backup Script

Can anyone tell me how to create a backup script for Ubuntu VPS which is used as a webserver. I also want to add it as a cron job so that it runs automatically every day midnight at ...
1
vote
2answers
103 views

Create a Screen session with a bash script using contab

I want a .jar file to run every time the server boots up (we're using a VPS), and so I've edited crontab using crontab -e and then adding @reboot bash /home/bash/startserver.sh. But I haven't even ...
0
votes
1answer
33 views

Scheduled Power On/Off of 2nd HDD

im using a ubuntu 13.10 Server. I want to switch off the 2nd HDD completely and only power it up once a week to back up the system+data from the 1st HDD. I know how to use crontab, but I dont know how ...
0
votes
4answers
666 views

php script not executed by crontab

I have setup a cron to execute one of my php scripts. But the problem is the php script is not being executed at all not even partially. Here is the cron I have set up 45 23 * * * /usr/bin/php -q ...
0
votes
1answer
38 views

Crontab wont run a script

I've set a script to run every 10 minutes using cron, but it does not run. It works when I run it manually. bin path is /usr/bin/. The script contains: #!/bin/bash scrot 'screenshot.png' -e 'mv $f ...
0
votes
2answers
45 views

Start-up / Reboot scripts for different users

I'm still trying to learn a little more about bash scripting and start-up / reboot, I have read about crontab @reboot and also just looking at other options but I just wondered if someone could maybe ...
0
votes
2answers
30 views

# in crontab used for what?

If I add up the # in front of some crontab task then it won't work and behave as comment ? right ? I want to disable some task for sometime until I like to enable. # * * * * /home/user/xx Thanks ...
1
vote
1answer
52 views

Ubuntu Server cron job doesn't work

My script that is supposed to run only when the server is on isn't working correctly when run by cron. If I run it manually, it works. backup() { if pidof java &> /dev/null; then ...
2
votes
1answer
30 views

Check when folder was last synchronized with rsync

I'm using a cron job to backup a folder to another computer. I'm not sure whether or not it succeeded and /var/log/rsync.log is only showing errors, all of which occured before the scheduled backup. ...
1
vote
2answers
160 views

How to craft a crontable entry that keeps MongoDB running in the event of a crash?

I need help crafting a crontable entry that will make sure the MongoDB service (daemon) is running on a particular port and if it is not, start it. I want to set this up so that if MongoDB crashes, ...
1
vote
2answers
188 views

screen shot from command line

I am writing a sh file to take screen short and want to schedule in crontab but when i run the .sh file it run OK no problem happens but when try to schedule it in crontab i got an error like ...
1
vote
1answer
84 views

Crontab GUI for Ubuntu 12.04

Is there any app for the Ubuntu 12.04 LTS (server, no visual interface) in order to easily manage crontab? Maybe a daemon running in background and access to it via a web browser? Using crontab -e is ...