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
2answers
729 views

In a cronjob copy files and change their names to unique values

I want to make a cronjob that makes a copy of every file in /var/log, and puts it in /etc/bak. That i do by making an sh file saying cp /var/log/*.* /etc/bak I would like these files not to be ...
0
votes
1answer
70 views

Restart service minutes after startup

I have a situation where I'm looking to run a service restart a couple minutes after startup. The particulars as to why are as follows, but the essense of my question is basically captured in in that ...
0
votes
1answer
54 views

crontab formats

I want to run few crontabs at startup and also at regular intervals. I have used the below format - # M H Dom Mon Dow 0 7-21/2 * * * //this will run daily from morning 7:00 to 21:00 clock with ...
0
votes
1answer
738 views

Cron running job multiple times

Hello I have a cron job that I have setup, everything was working just fine until a couple of minutes ago when my cron job scheduled to only run every five hours started to run several processes every ...
0
votes
1answer
324 views

Using rsync to mirror folders on NAS

I have an old netbook that I use as a torrent server running utorrent on ubuntu and accessing with the webUI, at the moment I add links through the UI and then manually copy the files over to my NAS. ...
0
votes
2answers
2k views

How to install changes to /etc/crontab

If I want to add lines to my system's /etc/crontab, what do I have to do to get them to take effect? Background: I'm trying to set up a machine with Ubuntu 13.04 so that it automatically ...
1
vote
1answer
2k views

Running a script everyday using a cronjob

I need the exact code that I would use because I'm not able to figure it out. I use crontab -e to set up a cron job but when I save it, it never works. I'm also just trying to run a file called ...
0
votes
2answers
2k views

Crontab and sSMTP

My server is Ubuntu 12.04.3 Cron jobs are working fine. I can send emails through command line, either using mail, ssmtp or sendmail. I have set the correct email address on top of the crontab -e ...
0
votes
1answer
171 views

How to execute a script with Cron

I would like to schedule a simple script to execute when the machine reboots. I have other schedule other commands in crontab using @reboot without any problems, but I can't seem to get my script to ...
3
votes
3answers
3k views

(Xubuntu) How to set the wallpaper using the command line?

I've done a lot of googling but haven't been able to find a solution to my problem. I am a teacher and I'm using Xubuntu on some student computers. I have everything locked down pretty good, but I ...
3
votes
1answer
151 views

Unable to start Ubuntu. Unknown Job

I'm new to Ubuntu. It asked me to reboot because of updates. Now it doesn't start at all. I've managed to get to GRUB. I went to previous versions, and selected the only one available ...
1
vote
1answer
8k views

Crontab Shut down command didn't work

I wanted Crontab shut down the system daily but it didn't do so, did I misspelled something? This is my Crontab file: /etc/crontab: system-wide crontab Unlike any other crontab you don't have to ...
1
vote
1answer
407 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
92 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 ...
3
votes
1answer
2k views

How to create a script to check for internet connection?

I'm new to programming in linux. I started bitcoin mining using linux mint xfce 15. I'm really good following directions, just don't know how to start. I need to create a script that can run every 15 ...
1
vote
0answers
155 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 ...
0
votes
1answer
57 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 ...
2
votes
1answer
556 views

Please install an MTA on this system if you want to use sendmail!

I get this message in /var/log/apache2/error.log everytime a cronjob on my desktop wgets a php page that tries to send an email. How can I install a dummy so this message is gone? I already have ...
0
votes
2answers
641 views

Cron Job Not running after proper setup

So I created a cron job as shown below: GNU nano 2.2.6 File: /tmp/crontab.uNoEXy/crontab # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be ...
3
votes
2answers
661 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 ...
1
vote
1answer
875 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 ...
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 * * * * ...
2
votes
0answers
119 views

Can I set up a cron job on Ubuntu Phone

I've been looking around, and can't find if Ubuntu Touch can run cron. So my question is: Can it? Also does it have a standard set of bash utils installed?
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
30 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 ...
3
votes
3answers
6k views

Why my weekly anacron job is not executed?

I'd like to use anacron for a weekly job on Ubuntu 13.04. Here's my /etc/crontab: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to ...
1
vote
2answers
443 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 > ...
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 ...
0
votes
2answers
348 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
125 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
152 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
321 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 ...
0
votes
2answers
26k 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 an error: "mail have sent to /var/spool/mail/lucky". The contents of ...
1
vote
1answer
253 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
137 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 ...
5
votes
3answers
2k views

Programmatically sync dropbox without daemon running

I would like to 'manually' force dropbox to sync at certain times (eg at regular, daily intervals using cron, as part of a larger backup script). My goal is to substitute the dropbox daemon with ...
0
votes
1answer
1k views

Make the daily log rotate run on exact time

I have Ubuntu 12.04.2 LTS server. My daily log rotations which are listed under /etc/logrotate.d/ are executed at the morning around 7:00 am, but it is not on exact time, each day it changed on range ...
3
votes
2answers
6k views

Why can't I restart cron daemon in 12.04 LTS?

I just changed the timezone on my server and therefore need to restart crond so that it will pickup the change, but when I try, this is what happens: root@s2:/# service cron restart stop: Unknown ...
0
votes
3answers
5k 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 ...
1
vote
2answers
256 views

Auto shut down if usage timer exceeds daily limit

I would like to activate a cron job valid for specific users only (for my kids) that it will check if the kids use the pc more than e.g. 60 min per day and then poweroff system. This means that if the ...
0
votes
1answer
79 views

When logging in directly to an application, will the transmission-daemon run in the background?

I have a media computer running Ubuntu 12.04 and XBMC. I also have flexget and transmission-deamon set up to run automatically every hour with a line in my crontab. @hourly /usr/local/bin/flexget ...
0
votes
1answer
109 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
8k 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
768 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 ...
6
votes
5answers
10k 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 ...
2
votes
1answer
196 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 ...
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 ...
4
votes
1answer
2k views

Does ubuntu support “@reboot” in crontab

Does ubuntu support "@reboot" in crontab ? I find documentation suggesting it is supported, but web chatter asserts it is not. I cannot make the @reboot section work. The "after midnight" section ...
0
votes
2answers
158 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 ...