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
578 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
933 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
104 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 ...
1
vote
3answers
1k 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
146 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
4k 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 ...
0
votes
0answers
112 views

Mythbuntu Database Backup - changing the number of backups saved

I would like to change the number of database backups saved from the default 5. I have already moved the mythtv-database script to /etc/cron.daily and it is creating a backup each day instead of ...
1
vote
1answer
223 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
76 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
1k 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
110 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
0answers
240 views

Networking not starting - OpenVZ default Ubuntu 12.04 Template

I have been using HyperVM to deploy OpenVZ Ubuntu 12.04 server instances. Unfortunately, they all boot without networking enabled. I tried inserting int the crontab: @reboot /usr/sbin/service ...
0
votes
1answer
38 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
524 views

Ubuntu 12.04: Crontab stopped running/Curl and cron blocking?

I have created a number of PHP daemons in the past and my general procedure is this: Run a cron job every minute to start up a new instance of the daemon Create a log file Check to see if enough ...
2
votes
1answer
393 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
493 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
425 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
0answers
64 views

need at jobs identified by name (advanced atd daemon)

Sometimes I'd like to delete or overwrite (or simply cat) an at job. Unfortunately, the at jobs are identified by a sequential number (file in /var/spool/cron/atjobs), which makes those operations ...
1
vote
1answer
533 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
905 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
59 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
820 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 ...
1
vote
2answers
3k 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
353 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
22 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
276 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
101 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
142 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
224 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
12k 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
223 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
123 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
2answers
1k 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
768 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
3k 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 ...
1
vote
0answers
128 views

Can't stop LAMP graceful restart

I just got my first LAMP up and running, everything works fine except that my server is restarting itself every sunday. When I read the logs I see "Graceful restart requested, doing restart" Should ...
0
votes
3answers
4k 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
214 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
72 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
95 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
7k 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
498 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 ...
4
votes
5answers
6k 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
154 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
1k 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
0answers
1k 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
112 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 ...
-1
votes
1answer
2k views

Cron job every second

How can I run a PHP script every few seconds in Ubuntu Server? (bonus: How can I run random within the cron script, e.g. every 3 seconds + random(3 seconds) )