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
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
327 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
120 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
149 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
294 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
21k 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
249 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
133 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
5k 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
252 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
77 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
105 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
707 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
9k 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
182 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
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
146 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
3k 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) )
0
votes
2answers
1k 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.
1
vote
2answers
21k views

Setup cron job to send email to a bunch of people on a regular basis

I want to send a fixed email reminder from my email address every Monday, Wednesday and Friday to a bunch of people. How do I go about setting this up using crontab? I have an email account on the ...
2
votes
2answers
165 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
763 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 ...
0
votes
1answer
315 views

How do I set up PHP and MySQL cronjobs on Ubuntu 12.04 (Precise Pangolin) server?

I just made a LAMP install and got SFTP working. My question now is: How do I set up cronjobs on Ubuntu server? I need to make some cronjobs for my PHP/MySQL application. I look for un-activated ...
1
vote
1answer
73 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 ...
0
votes
4answers
2k views

php script not executed by crontab

I have setup a cron to execute one of my php scripts. But the problem is the php script is not being executed at all not even partially. Here is the cron I have set up 45 23 * * * /usr/bin/php -q ...
1
vote
1answer
583 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
4k 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
2k 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 ...
4
votes
1answer
704 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
849 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
49 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
257 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 ...
0
votes
1answer
1k 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
509 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
873 views

Can't find where scheduled task is set

I have a production server running a scheduled task that I simply can't track down. It seems that it is running dbdump.bash on a daily basis, but none of the cron files have a reference to that or ...
4
votes
1answer
3k views

Disable daily anacron mail updates

Every day, I get the following mail delivered by postfix: From: Anacron <root@name.domain> To: root@name.domain Subject: Anacron job 'cron.daily' on name Content-Type: text/plain; ...
1
vote
2answers
608 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
2answers
362 views

How to craft a crontable entry that keeps MongoDB running in the event of a crash?

I need help crafting a crontable entry that will make sure the MongoDB service (daemon) is running on a particular port and if it is not, start it. I want to set this up so that if MongoDB crashes, ...
0
votes
3answers
410 views

Restart Network-Manager every n minutes/hours

I have a problem with my Ubuntu machine. Every 15-20 mins my wifi stops working. The connection remains intact but internet access dies. Whenever this happens - I restart Network-Manager and all is ...
1
vote
1answer
3k 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
256 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?
0
votes
4answers
100 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
1answer
731 views

Schedule to turn off monitor via crontab?

I want to turn off monitor on a specific period of time automatically (for example between 07:00 and 11:00). Is there any command to be set in crontab file? Is there any better way? In summary: ...
7
votes
2answers
29k views

How can I see/stop current running crontab tasks?

How can I see crontab tasks which are in progress? How can I stop crontab tasks which are in progress, manually? Is [this] question about see the current running cron processes? Yes To ...