0
votes
1answer
47 views

Shell script not running with cronjob

I am using PUTTY to reach the server. I can dump the databases with the following command: /usr/bin/mysqldump --all-databases | /bin/gzip > Backup_DB/alldatabases_test.sql.gz When I am running ...
1
vote
1answer
122 views

Cronjob for first day of month except sunday

I have such entry in my crontab: 0 0 1-2 * 1-6 It is correct that it would run at 00:00, 1st or 2nd day of the month from Monday to saturday? For example, if 1st day will be sunday then it would not ...
1
vote
0answers
70 views

Enabling crontab logging on openSUSE

I am trying to enable the crontab log on openSUSE 11.3. I searched the web but couldn't find how to do it. I only find information about Ubuntu. Tried editing the /etc/rsyslog.d/remote.conf file but I ...
1
vote
1answer
88 views

Why this cronjob wont run

On debian squeeze as user root I add this cronjob with "crontab -e" */1 * * * * root /usr/sbin/ntpdate ptbtime1.ptb.de >> /var/log/ntpdate.log But this cronjob will not run, there is also ...
0
votes
1answer
124 views

I created Cron but I get errors that don't really understand

I created a crontab like this: 0 22 * * 2 /bin/echo " Hello World " 0 1 * * * /bin/echo " Test" but I receive mails like this, what does it mean? Subject: Cron /bin/echo " Test" ...
0
votes
1answer
132 views

Cron Job Command To Delete 0 Byte Files

I need to have a Cron Job, that when it runs automatically deletes all of the files inside of a folder that are exactly 0 bytes. The script I am using allows users to enter their username so it ...
2
votes
1answer
162 views

Schedule a cronjob everytime it is done

I have a cronjon which runs every 48 hours. But ideally what I want is that it must start running as soon as it stops. Can this be done? It is an sh script consisting of a python command. I am using ...
1
vote
3answers
1k views

Why does this crontab file only run once?

I have the following crontab file: 2 * * * * /bin/date >> /home/jon/date_from_cron.txt I think this means "run every two minutes". However, it only runs once. Shortly after setting up this ...
0
votes
0answers
31 views

This weird behaviour from cronjob

I have set the crontab like this: */5 0 * * * /www/permitChat.sh and the /www/permitChat.sh is this: # We are setting the name of file # in the variable along with complete path. sFilePath=`date ...
0
votes
1answer
88 views

Crontab as other user

I am running crontab as root user: screen -S konsola -X stuff 'say hello'`echo -ne '\015'` How do I run it as the user "nobody"? Only this user has screen with given pid, thats why I need it.
1
vote
1answer
402 views

Run Cron every 2 minutes in 30 minutes?

I need to run a cron job every 2 minutes (*/2) but only for the first 30 minutes of every hour, with pause of 30 minutes between the runs. For example, something like: From 10h00 to 10h30: run ...
0
votes
1answer
322 views

Cron job for moving directories older than 24 hours

Well, what I want to do is The cron should run every hour or so It should move the directories in a folder /disk1/data/ older than 24 hours to /disk2/data/ The directories moved should contain all ...
1
vote
2answers
343 views

Why cron saves at /root, when should at /var/www?

Why my cron */1 * * * * /usr/bin/php /var/www/query/query.php &> /root/querylog.log saves query.php output in the /root/ folder? (this script shall save *.txt at its location) It should do so ...
1
vote
1answer
225 views

What might cause cron jobs to occasionally not run or complete?

In my crontab, I have set MAILTO and a bunch of cron jobs (5-10 jobs). These cron jobs usually run fine and I get emails for them. Most of these jobs consistently run as expected. Emails and ...
1
vote
1answer
746 views

How do I make cron run a Java GUI application?

I have a script which runs a Java GUI application using "java -jar app.jar". I have added the script to the crontab to run every minute, check the processlist if the application is up. If it isn't it ...
1
vote
0answers
819 views

Why does cron task run twice?

I have a task that should run each day in Ubuntu10.04. So I use crontab and copy the scripts of the task to the directory /etc/cron.daily. Here is the my crontab: # /etc/crontab: system-wide crontab ...
3
votes
3answers
6k views

Timezone issue with cron

My cron jobs are computed one hour later compared to server time. I don't understand what is going on. My configuration is the following : Server time : Europe/Paris In /etc/default/cron I added ...
2
votes
2answers
1k views

How to set CRON to execute a php file outside of a public html folder?

I have a php file located at, let's say, for example: /data/web/process.php This file is not publicly available (no virtual host is running in that folder, but apache is installed). I need to ...
1
vote
1answer
11k views

rsync cron job with a password?

I want to set up an rsync command as a cron job, so I need to find a way to supply my server password automatically to rsync. Currently I have a shell script that looks like this: #!/bin/sh rsync ...
0
votes
2answers
307 views

cron: log output of job, email errors?

This is a ridiculous newbie question, sorry! I am running a (Python) script regularly using cron. I would like to log the output to a logfile, and I would like to be emailed with any errors that ...
9
votes
2answers
5k views

Difference between /etc/crontab and “crontab -e”

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?
5
votes
2answers
2k views

Only email on cron errors for jobs in cron.daily, cron.hourly, etc

I have several cron jobs that run (in /etc/cron.daily, /etc/cron.hourly, /etc/cron.weekly, etc.) and email root@localhost with the results. I'd like to stop those emails if the jobs are succeeding, ...
1
vote
4answers
185 views

Cronjob not working

I've got a simple crontab for ripping my local radio station only when I want: 0 16 * * 0 /root/streamripper.sh 0 17 * * 0 killall streamripper 0 20 * * 0 /root/streamripper.sh 0 21 * * 0 killall ...
4
votes
2answers
1k views

Can Ubuntu play a video via cron job?

I'm developing a display system for a paint shop. I've set up a computer with Ubuntu to run the video and display it on a TV, running a PHP script that should update the video every hour via the ...
0
votes
1answer
1k views

How to update svn working copy via a cron when svn server is located on local server

Hey guys, I have two servers. One of them has a svn server running and another hosting projects. I have a daily cronjob updating the projects -- ie running svn update, rebuild etc. Now, my ...
19
votes
3answers
31k views

How to run a cron job as a specific user?

I would like to run a cron job as a specific user on my machine. How may I specify the user for a cron job to run as?. I am running on Ubuntu 10.0.4 [Edit] The cron jobs will be running on a ...
2
votes
2answers
1k views

Help with running crontab from root

I'm using Mac OS X and having trouble getting a cron job to run. I type the following: $ sudo -i $ crontab -e I then enter: * * * * * root ifconfig en0 down > /dev/null 0 19 * * * root ifconfig ...
1
vote
3answers
8k views

How to create a cron job to upload files to an FTP server

I would like to create a cron job that uploads files from a directory on my computer to my FTP server. I would like it to do it daily at midnight. I know pretty much nothing about cron, so I ...