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
1answer
45 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
118 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
3k 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 ...
4
votes
1answer
84 views

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 loads. We have chased this problem down to cron and sendmail. Adding MAILTO="" on top of ...
1
vote
0answers
169 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
51 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
21 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
152 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 ...
4
votes
2answers
292 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
55 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
418 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
85 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 ...
3
votes
1answer
277 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
3k 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 ...
0
votes
1answer
698 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
2k 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
50 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
45 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
144 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
52 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
128 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
45 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
236 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
1k 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 ...
2
votes
2answers
6k 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
4answers
14k 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
296 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
273 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
48 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
37 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
3k 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
10k 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
83 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
886 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
25 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
53 views

Network Information for Theft Prevention [closed]

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

Cron not running script

I have a script that works when called: /usr/local/bin/myscript #this works fine Permissions for the file are: -rwxr-xr-x 1 root root 155 Jan 27 09:34 myscript I've added a line to /etc/crontab: ...
1
vote
1answer
2k views

no crontab for [username] - using an empty one

I want to run a bash file (abc.sh) on the desktop that runs a python file on the desktop as well. How can I do that? I tried to do the following simple task just to test the crontab: (here the abc.sh ...
0
votes
2answers
3k views

How to remove or delete single cron job using linux command?

I have created cron jobs for my site which is listed below and they are working fine.I print all cron job by using this command $cronfiles=exec('crontab -l',$output); echo "<pre>"; ...
1
vote
1answer
141 views

Why do I get that error from a CRON job?

I am trying to write a cron script to check if my minecraft server is running or not and if it is down to run the start up script. Here is what I have and this is the error I get when running it ...
0
votes
0answers
138 views

@reboot crontab vs startup script

What is the difference between using @reboot cron and writing a startup script (a script in /etc/init.d) ? In which scenarios should one be chosen over another ?
0
votes
1answer
49 views

Only part of crontab working [duplicate]

i have a line in crontab: * * * * * date >> /home/pana/temperatures.txt; hddtemp /dev/sda >> /home/pana/temperatures.txt ;hddtemp /dev/sdb >> /home/pana/temperatures.txt ;sensors ...
3
votes
4answers
84 views

Is it possible to limit Software Center or apt-get install downloading to a specific time of day?

I have free bandwidth everyday from 12 am till 7 am. That means I put everything that I want to download in the software center and go to sleep. I want the download process to stop at 7 am. For that ...
0
votes
1answer
62 views

cron not outputting correctly?

Please forgive my ignorance. I have searched, but perhaps I’m not sure really what to search for in order to answer my question myself, so I’m turning to this forum for a little guidance. I’ve ...
2
votes
1answer
129 views

Where to check if a cron job was ever run?

I set a few cron jobs locally on my machine. They were supposed to run each night at 8 PM. Where can I see or check that they actually run?
0
votes
1answer
68 views

A shell file containing count but not showing when I try to run from crontab

I am new in writing shell script i write a script like this #!/bin/bash PID=$(ps -ef | grep "sh gps.sh" | grep -v grep | awk '{print $2}') if [ -z $PID ] then cd /opt/etrans/cronjobs ...
1
vote
0answers
117 views

Configuring logrotate without root access (per user log rotation)

How best can logrotate be configured, on a per-user basis, to rotate files in the home directory of the user, under control of a per-user 'crontab -e'?
0
votes
0answers
41 views

No cron job for root

I am trying to make source distribution(python package) which has setup.py file that deploys cron job using subprocess call. But Error is coming : No cronjob for Root Here is setup.py file : $ ...
0
votes
0answers
23 views

How to autorun bash script in terminal as root? [duplicate]

I'm trying to make this script to autorun at startup, it needs root priviges, but I'm trying to run it without typing in my password. I have tried to add it with crontab, but nothing seems to happen. ...