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)

4
votes
1answer
643 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 ...
0
votes
1answer
804 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
48 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
234 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
824 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
460 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
782 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
2k 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
553 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
306 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
389 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
2k 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
241 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
93 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
694 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
25k 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 ...
2
votes
2answers
6k views

Getting output from a cron job on the terminal

I have a program that prints some output that I would like to pop up on my terminal once every hour during the workday. $ crontab -l 0 07-17 * * * /home/dat/scripts/cron.out syslog reports the ...
3
votes
2answers
2k views

Automating duplicity backups using cron

How do I automate duplicity backups using cron using gpg encryption and the ssh backend?
0
votes
1answer
140 views

Cron fails at night

I have set up a cron job, but for some reason it fails to run during the night. The same job runs fine when i'm running it during the day (i.e. setting up the same job to run in a few minutes and ...
1
vote
1answer
166 views

Need a way to start web cam recording at specific time

I have a laptop with an integrated camera and I want to write a script that will record a 10 minute video when the clock reaches a certain time. What apps/commands can I use to achieve this?
2
votes
1answer
209 views

Crontab not working with inner unix command

I have following crontab entry which does not work. Please can anybody help? @midnight scp /home/xxx/file.txt xxx@yyy:~/zzz/file.txt_`date +"%m-%d-%y"` This command works very well when run from ...
4
votes
2answers
945 views

A script to monitor new files in folder so I can add them to an external XML files

I want to monitor (by cron, I got that part covered :P) new audio files in folders so I can add them toa separate XML files which act as an podcast RSS feed. The file structure looks like this: - ...
4
votes
1answer
2k views

Hourly GIT Push

Is it possible for me to automate a Git push every hour via a batch script. I would typically type in this: git add * git commit -m "latest update" git push ...
1
vote
1answer
872 views

Machine stops suddenly, Only hard reset can help

It is happens sometimes, im just working and suddenly machine starts lagging. Then it can totaly stops (Nothing works, mouse, keyboard etc.), or sometimes not. Jun 5 16:04:12 c0rp kernel: [ ...
1
vote
0answers
73 views

Backup regimen - is this plan any good?

I have a desktop that has some valuable personal and financial records, photos, etc. I installed a second drive formatted ext3 called 'internalbackup'. I've been using a variety of backup programs, ...
0
votes
1answer
580 views

Why anacron does not call the crontab user files?

I want a special command to be lauched everyday, but dont want to put it in the /etc/cron.d/ because its a user specific user! pg@pipoTower: ~$ crontab -l # m h dom mon dow command 0 0 * * * ...
2
votes
2answers
5k views

How do I setup two cron jobs to run every night at 3:00 and 3:10?

I have an ubuntu home server running virtual box. I have virtual server running on that box that I am having problems with. For now I don't have time to troubleshoot the actual issue but I have ...
2
votes
2answers
7k views

executing a shell every minute using cron

i want to run this bash code every minute using cron. I saved it onto /root/activate.sh #!/bin/bash for file in /home/user/torrents/*.torrent do if [ "$file" != "/home/user/torrents/*.torrent" ]; ...
0
votes
1answer
275 views

Can't seem to get script/cron job to work?

ive written a ffmpeg script to mass convert mkv into mp4. when i run the script as my user, and enter my password for sudo privileges it works very well from the command line. the script is: #! ...
4
votes
5answers
3k views

Notify-send doesn't work from crontab

I made a script that should notify me when there's a new chapter of manga that I'm reading. I used the command notify-send to do this. The program works when I am trying to run it in terminal. The ...
1
vote
1answer
405 views

remove completed downoads from rutorrent

I just setup rutorrent after being a long time rtorrent user. I want to remove the completed downloads. When I use a .torrent file i just have .rtorrnt.rc remove the file and rtorrent removes it from ...
2
votes
2answers
2k 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 > ...
9
votes
2answers
9k views

All commands in my crontab fail with “Permission denied”

crontab -e and crontab -l work just fine: $ crontab -l | grep -v '^#' * * * * * /usr/bin/env * * * * * echo 'Hello from crontab' However, I see two messages like this every minute in ...
0
votes
2answers
249 views

cron job not executing youtube-dl command

I want to use the "youtube-dl" command in a cron job to download videos fron youtube. Therefore I created the following cron job: 26 00 * * * /usr/local/bin/youtube-dl -o ...
4
votes
1answer
695 views

Rsync behavior in a cron script

I have an nfs device that creates checkpoint (backups) everyday. I want to use Rsync to copy these checkpoints to another device (Drobo connected via iSCSI). So I've run the script on a single nfs ...
0
votes
3answers
395 views

How to open a crontab file in c++

I am working on a QT application which makes the usage of crontab easier with GUI. But I am facing the trouble of including the jobs in the crontab file from my application . So how do i open a ...
1
vote
1answer
378 views

Startup script doesn't execute at startup

I have followed the tutorial here that shows how to setup the No-ip update program to start at system startup. I have done exactly as specified here, yet the program still doesn't start. Also, when I ...
2
votes
1answer
2k views

Run two commands sequentially uisng crontab

My 3-year girl loves SuperTux. she couldn't control the mouse! so the game should run automatically on startup and after the game, computer should shut down automatically, too. however I put the ...
3
votes
1answer
468 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 ...
2
votes
1answer
658 views

Shell script runs fine by itself, but not in cron

I have a shell script that runs nmap on an address, and I want to have it do it daily for me. So I added a reference to it in my crontab. Unfortunately, for some reason it doesn't recognize the ...
0
votes
5answers
10k views

Cron job to restart Apache

Ubuntu Server 12.04. I use: sudo crontab -e * * * * * root /etc/init.d/apache2 restart > /dev/null 2>&1 sudo restart cron And it doesnt work. How to fix it? So many docs in google,I need ...
1
vote
1answer
462 views

Kill a cron job from cron

I want to start the ubuntu update at night because internet is free at that time. and then kill the process in order to ensure that it does not download anything after 7:00 AM. Is there any way to ...
2
votes
1answer
125 views

How to run a cron entry periodically?

I have a line of script that works through terminal and works through cron to run one time: it downloads a file from the internet and saves it in a specific place named as the date it was found: cd ...
1
vote
1answer
225 views

crontab does not run

i have added a script to run every min like this crontab -e and then add this code * * * * * /bin/sh /home/user/Public/call.sh the code did not run then i restarted the cron sudo ...
2
votes
1answer
173 views

Script that opens webpage and records it as cron job

I need and have to create a script that takes webpage address and time in seconds as arguments. It records whatever is shown on the webpage - i.e. JavaScript and HTML content (Flash not required). ...
2
votes
1answer
419 views

How can I create popup windows?

I have a small script run by cronjobs to synchronize a git repository every 2 hours. The git will be pushed to the server with a constant message. How can I have a popup windows which ask the message ...
2
votes
1answer
3k views

Running two commands in crontab

I have this line in my crontab file */1 * * * * espeak 'foo' && espeak 'bar' But only half of it, first command gets executed every minute. While when I write this in the terminal it works ...
2
votes
3answers
4k views

How can I use Cron to run shells scripts at a fixed time?

I am wanting to learn cron and I searched for some quality tutorials. I found How do I set up a cron job. My goal is to have a folder on a network that will have sub-folders. Each sub-folder is a ...
4
votes
3answers
4k views

unattended-upgrades not running, /etc/cron.daily/apt missing

I have automatic-upgrades installed and configured, but it never seems to run, because there are always security updates waiting to be installed when I check. ...
0
votes
2answers
2k views

Cron not working

Wrote a short shell script "wallch.sh" to randomly change my desktop background: DIR="/home/user/Wallpapers" PIC=$(ls $DIR/*.jpg | shuf -n1) FIL="file://" gsettings set org.gnome.desktop.background ...