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
vote
1answer
536 views

Cron job creating empty files in root

My cron job, command looks similar to this: wget -q http://whatever-url/ It is running correctly (every minute). Problem is that it is creating empty php files at my root for every minute it runs. ...
0
votes
3answers
107 views

Cronjob for specific hours

I need a cronjob with criteria to power on/off a TV on the basis: Mon-Fri, power on the screen at 07.00 and power off the screen 17.00. Friday after 17.00 to Monday morning to be powered off. I'm ...
0
votes
1answer
60 views

problem with crontab entry with time tag

Does the following entry in a crontab have any problem. It's not giving output with time tag.. SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ferret/bin ...
1
vote
0answers
186 views

Why won't cron run my sh script?

Used gnome-schedule to create a script to set my headset as the fallback audio device because it keeps unsetting it when the headset gets disconnected or pc goes into sleep mode. Anyway, crontab is ...
1
vote
1answer
1k views

Cron won't execute if am not logged in

I have a cron that makes a backup of MySql, if I execute on shell it works pretty well even if I'm logged when cron supposed to execute works fine, but if I'm not logged just won't execute, I don't ...
3
votes
1answer
483 views

Cannot get gsettings set to work at boot using cron, rc.local, or autostart

I am trying to "lock down" the computer by running a script at boot that turns lock on, lock screen after 10 min and require password, etc. I am using Ubuntu 12.04 I have tried editing crontab, ...
3
votes
2answers
953 views

Crontab commands and backup

I have the following crontab running on my server: 0 23 * * * /etc/webmin/postgresql/backup.pl --all @daily /etc/webmin/fsdump/backup.pl 155931323799484 30 20 * * 0 /etc/webmin/fsdump/backup.pl ...
0
votes
1answer
2k views

Cron is running but not providing output data

I'm trying to make my Amazon EC2 instances stop and start by a crontab. EC2 Api tools is succesfully installed. Manually it works. The cron (which I put in with the command crontab -e): 10 * * * * ...
0
votes
1answer
1k views

Cron not running scripts, no errors in /var/log/syslog

I have a script that creates a file in cron.d and puts some jobs in it. Cron seems to not execute these jobs at all, since the program it runs is set to log all executions. The file inside cron.d ...
0
votes
1answer
31 views

A bit of help with cron script please

I would like to set a cron on an ubuntu server to download a file to a specific location. How would I go about this? For example once a day I would like my ubuntu server to look for a file on a ...
1
vote
2answers
475 views

Script won't run properly in crontab, no path or permission problems

I use the geany text editor, which has a command line option to list all open documents. The following command works fine when run from the command line: /usr/bin/geany --list-documents > ...
2
votes
2answers
5k views

Problem with crontab, script runs when executed from command

this is my cron entry: */5 * * * * /home/user/scripts/backupDB.sh && echo "Backup Successful: $(date)" >> /home/user/tmp/mybackup.log This is the script that is called: #!/bin/sh ...
0
votes
0answers
23 views

Cron job as specific user not running [duplicate]

On my Ubuntu box I have a crontab setup for my normal user that has the following: 0 0 * * * sudo mysqldump -u root -h localhost --all-databases | gzip > /home/<user>/mysqlbackups/db_`date ...
1
vote
2answers
483 views

Cronjob is not running, but works from scheduler

I have this script for file show.sh #!/bin/sh zenity --warning --text "here" in crontab i have this line * * * * * /home/user/Public/show.sh then i restarted my crontab user@user-170:~/Public$ ...
0
votes
1answer
161 views

Schedule task to close

I want to schedule transmission to close at a certain time every day in Gnome Schedule task. I figured out how to get transmission it open at 12:01am, but how do I make it close at 5:00am?
1
vote
1answer
167 views

Cronjob Bash not exporting

I have written the following script to run for when users have last logged in. I am trying to export a cronjob to a .out file. For some reason, I cannot get it to export. #!/bin/bash for User in ...
0
votes
2answers
408 views

Why does my cron job appear to do nothing?

I wrote a groovy script to check a service and send email if it found a problem. It works fine from the command line. I've struggled with getting it to work properly from cron. This is my current ...
3
votes
3answers
4k views

Getting notified of failed cron jobs

I'm concerned that cron jobs can fail silently for an indefinite period of time on vanilla Ubuntu Desktop 12.04.1 (Precise), and no one will notice. I would like to get a notification whenever a ...
1
vote
1answer
279 views

Cronjobs made via cronjob not working

I have the following in my cronjob -e: 00 17 * * 1-5 /home/jhvisser/bin/drive-at-five-record 00 18 * * 1-5 pkill rtmpdump 50 15 * * 1-5 /home/jhvisser/bin/z1035-no-commercial 55 16 * * 1-5 pkill ...
0
votes
2answers
144 views

I cannot find my schedule for system shut down

Long time ago I set a schedule for shutting down the system at a particular time. Now I need to change this time but I cannot find this schedule anywhere. I checked crontab and gnome-schedule Does ...
3
votes
1answer
823 views

Can't get MAILFROM to work in crontab on Ubuntu server 12.04

Is MAILFROM supported in crontab in Ubuntu server 12.04? Cron job errors are sent via exim ok, but the sender, root@localhost, is not acceptable. MAILFROM in crontab works fine on my Fedora Core 15 ...
0
votes
4answers
119 views

Minutely cron job is not running

I added the line */1 * * * * /home/zach/test.sh to my crontab, where the contents of /home/zach/test.sh are as follows: touch /home/zach/test.txt Yet, no file test.txt is being created in that ...
2
votes
2answers
3k views

Crontab not running a script

I have set my crontab to run 2 script: $ crontab -l 0 20 * * * /usr/bin/bkp.sh --silent > /home/perforce/logs/bkp.log 2>&1 0 21 * * * /usr/bin/flsbk.sh --silent > ...
0
votes
3answers
6k views

Cron to send email if file doesn't exist

I have a cron job that executes a shell script like following 00 01 * * * sh /backup/script.sh Now I need to add a functionality in cron so that if this script doesn't exist then it generates an ...
3
votes
2answers
2k views

Why is git not using my pubkey with crontab?

To backup my sql database I have a cron job running that makes a mysql dump. Now I want to create another cron job that commits this dump to the repo, the problem now is that it doesn't work. In the ...
0
votes
1answer
113 views

Cronjob sends out mail but I did not specify one…?

Have built an asterisk system using Ubuntu everything works great however I have one question. Have created a cron job and I receive an email which I did not specify in the crontab -e now the job ...
2
votes
1answer
1k views

Ubuntu 12.04 cron not executing

Here's the issue I'm having... I have a webserver that sees a fair bit of traffic. I want to keep a near real time backup of it on another server. That backup server will process log files, visitor ...
0
votes
1answer
9k views

Cron job not running

I have created a script #!/bin/bash echo "tredor" If I run it using command line, it works, but when I move it to being a cron job, it doesn't. In crontab -e , I entered the following code */5 ...
0
votes
1answer
1k views

Loading data into MySQL database using cron

I would like to make the loading of data into MySQL database (Ubuntu 12.04) a cron job. I have am able to do it manually using the code: LOAD LOCAL DATA INFILE re.txt INTO table rasss LINES ...
1
vote
2answers
2k views

Loading data into mysql database

I have a text file which i would want to load into mysql database on Ubuntu server 12.04 LTS. I have entered the data into the file trey.txt and i moved the file to /tmp directory. When i move to the ...
2
votes
1answer
277 views

Cron task appears to run in syslog, but does not appear to be actually running

I made a short script on one server to backup a folder and send it via FTP to another server. I'm trying to set it to run every minute using crontab. It works perfectly when I run it manually, but ...
5
votes
4answers
10k views

Setup CRON weekly backup

I want to make a backup of my /var/lib/mysql and /var/www folders and save them as tar.gz files to my mounted network file server (uslons001). Here is my bash file located in: ...
0
votes
2answers
198 views

what does /path/to refer to in entering a cron job

I want to create a cron job which will run every 5 minutes. I have understood the concept of setting the condition of 'every five minutes' from a previous answer on the same topic. However, i do not ...
0
votes
2answers
2k views

Run Cronjob every night between 3-6 o clock but only once

I want to run a cronjob daily at a specific time range but only once in that period. How is that possible? I see a possibility in anacrhon but don't know how to set up such scenario.
2
votes
2answers
198 views

use Cron to mail log from a job

I have a weekly script that cron runs to make a zfs snapshot. I was wondering if it is possible to mail a OK mail if the job run correctly and a error mail if something happened and in the content of ...
0
votes
1answer
1k views

Check if torrent file is complete before copying

I have a crontab command that daily copies .iso files found within my torrents folder into an iso directory on a separate partition. My problem is that multiple .iso files will still be in the process ...
1
vote
1answer
77 views

Crontab woes — help me figure out why it's not running

I'm having troubles creating a crontab that executes a series of php scripts when I specify it. From what I can tell the cron doesn't even run... Also if someone knows a method to allow me to run ...
1
vote
3answers
5k views

SFTP upload script, there is no key

I need to upload a file to a server. The server uploads using SFTP. After authentication, any command execution is forbidden, so I cannot SSH directly in, I need to get directly into the SFTP ...
1
vote
1answer
1k views

how to know WHAT and WHEN the next cron job is?

Is there a tool or a way to view the next scheduled job (in the system or at least at the user level) and its time, without looking into crontab (crontab -l)? Edit: Imagine that there are 500 ...
1
vote
1answer
6k views

Script not running from crontab but running from terminal?

The script is running from terminal but not from crontab.The script code and error i am getting is written below : Cronjob */5 * * * * cd /root/; python mkdir.py Script #!/usr/bin/python import ...
0
votes
2answers
3k views

Cron creating empty files in the root directory

It creates files with 0 Bytes, with the same name as the php being called in the task. I have a task that runs every minute, my folder /root is crowded. My task: * * * * * /usr/bin/wget -q ...
5
votes
1answer
1k views

Crontab won't execute vlc live stream

Im trying to auto start and stop a rtps stream via vlc in the crontab: sudo crontab -e 15 9 * * * vlc -vvv rtsp://user:pwd@xxx.xxx.xxx:xxx/stream1 and nano /etc/crontab 14 9 * * * camera vlc -vvv ...
-1
votes
1answer
1k views

Give www-data permissions of root?

I want to access the root crontab from web interface.I have Apache and PHP installed.I have a project in which i have to change the job timings in crontab. How can i change the timing of crontab jobs ...
1
vote
1answer
53 views

cronjob to store home-ip

I'm working out a cronjob to store my current ip (home-server) on my external VPS server in a database. I can now use the ip to connect to my home server without using DynDNS. (OK, probably you think ...
0
votes
1answer
321 views

Starting xterm windows via cron

I am using cron on Ubuntu Server 12.04 to schedule the system to automatically reboot at midnight, and on reboot, execute a script that starts a vnc server and opens eight terminal windows and runs a ...
1
vote
1answer
2k views

How do I make my system crontab fetch a URL and email it to me?

I am running Ubuntu 12.04 with Apache module. I opened crontab by executing vi /etc/crontab It says on the top that unlike any other crontab you don't have to run the 'crontab' command to install the ...
0
votes
1answer
746 views

Ubuntu 12.04 how to completely remove anacron

I am using Ubuntu 12.04 for an embedded project. I need cron jobs to execute only at their specified time, because time may be stepped forwards (resulting in a missed job) but those jobs should be ...
1
vote
2answers
853 views

Cron job isn't working

I have an sh file called m.sh with the contents: echo "Cleaning memory" sync; echo 3 > /proc/sys/vm/drop_caches echo "" free -m echo "" ps cax | grep java > /dev/null if [ $? -eq 0 ]; then ...
1
vote
1answer
4k views

when I run a bash file manually, it works, but crontab can not run it?

This is my sh-file: http://paste.ubuntu.com/5816543/, that I use this to download youtube files in a specific period per day. when I drag the file (y.sh) into the terminal and press return key, it ...
1
vote
1answer
333 views

Cron job bash script to restart desktop sharing?

I'm having trouble with desktop sharing crashing while during remote sessions. Is there a way to set cron to check and restart, if necessary, the desktop sharing application with a bash script?