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
9 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
23 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 ...
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 ...
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 ...
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 * * * ...
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 * * * ...
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
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
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 ...
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 ...
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
68 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
57 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
35 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
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
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 ...
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 ...
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 ...
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
43 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
154 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 ...
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
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
101 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
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
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
82 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 ...
1
vote
1answer
1k views

Crontab error “No crontab for root”

when I write crontab -e command in terminal, I get this error message: no crontab for root - using an empty one 888 I don't know what '888' is meaning? Config file of crontab /etc/crontab: # ...
0
votes
3answers
138 views

How to Setup a root cron Job Properly

I tried to setup a root cron job to run a Bash script as root, to run at minute 7,37, every hour, every day of month, every month. This script is located in /usr/bin and named tunlrupdate.sh is used ...
0
votes
0answers
96 views

Cronjob for MySQL Backup Bash Script Not Running

I am trying to backup many MySQL Databases on a daily basis into a Single ZIP. The bash script works fine by itself (ran in normal environment), but when the Cronjob takes over it does not run. Infact ...
0
votes
1answer
50 views

How to detect error in cron jobs

The reasons why a cron job may fail is really very large. Most common reasons may be, Syntax error Using executable without proper path Using a shell variable which is not defined in cron ...
1
vote
0answers
31 views

Make CronTab not asking for id_rsa keyword when running in terminal

I like to do some git pull inside a script and see see output of it. So I made up this cronjob to test: DISPLAY=:0 * * * * * mike /usr/bin/gnome-terminal -x zsh -c "/var/www/up.sh; zsh" ...
0
votes
2answers
24 views

How to put availabe disk space into filename?

I have a SFTP user only and I want it to be able to see available space. I want to make a cron that runs each 30 minutes, to delete the old file and put the new file to show free disk space. I could ...
1
vote
1answer
220 views

Running PHP Cron Job with Arguments

Im trying to run a PHP script, once a day, on ubuntu 13.10 server with php5. I have cron jobs set up, via ajenti control panel, verified with crontab -l, for this command. php /path/script.php ...
1
vote
1answer
1k views

Open firefox from bash file “Error: no display specified”

I need to open a browser and access my server with the ip address 1.2.3.4. First I ping my server and if the ping did not fail I launch the home page in a browser. For this I have written a bash file ...
0
votes
1answer
53 views

Why the cron job did not fire on ubuntu 12.04?

Here is the script sqlite_backup.sh under $HOME/: #! /bin/bash now=$(date +%d) echo "Welcome to Sqlite backup script" sqlite3 /var/www/db/nbhydb.sqlite3 << EOF .timeout 20000 .backup ...
0
votes
0answers
298 views

Java -jar runs via shellscript but not via cron

I have a shell script that I want to schedule via cron to be ran every 10 minutes. The shellscript runs a jar file. If i run the shellscript via ./sensorrreader.sh it works just fine (creates a file) ...
0
votes
0answers
24 views

Crontab is not giving me error notifications [duplicate]

I don't always have the most reliable internet and I miss the feature in Windows where you're network icon changes. So far the only thing I can find to replace this is a cron job that pings. I set up ...
1
vote
2answers
40 views

Network Information for Theft Prevention

I haven't seen much of this around, and I'm not a network expert/sysadmin, so I need some advice. I have a laptop that I'd like to "protect" against theft (this is really a game more than a real ...
1
vote
1answer
52 views

System crontab entries not being run

I am running Ubuntu 12.04 LTS Desktop. I have used the /etc/crontab to set up a couple of entries that should run at different schedules. Now, the problem is that these do not seem to be running. I ...