The cronjob tag has no wiki summary.
0
votes
1answer
54 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
36 views
Mac Crontab Deleted
I was messing around with creating cron jobs and somehow I wound up deleting crontab out of /usr/bin. Does anyone know of a way that I can recover it without having to re-install multiple components ...
0
votes
0answers
40 views
How to Check for Failed Hardware (and other things) in Linux?
OS: Ubuntu Server 12.04
I have three HDD's, configured for software RAID5 to be seen as 1 HDD. I just discovered the file-system check utility (fsck) but am wondering if there are any other tools I ...
0
votes
0answers
125 views
Issue in running cron jobs in RHEL5
When I try to run cron jobs from root, I am getting the following error. I am using RHEL5. Can anyone help me?
[root@localhost]# crontab -e
Permission denied
You (root) are not allowed to ...
-4
votes
1answer
53 views
Schedule a cronjob start everyday automatically [duplicate]
Possible Duplicate:
Is there a way to have Linux run a command every X minutes?
I want to run a command which will be synchronize my remote folder data to my local computer.
command is sync ...
0
votes
1answer
29 views
synchronize folders which are located on different servers [duplicate]
Possible Duplicate:
Synchronise system changes on two computers?
how to synchronize two folders which are located on different servers. I need that if someone put any data on folder A then ...
2
votes
1answer
91 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 ...
0
votes
1answer
66 views
Where to store cronjob script?
I'd prefer to not keep it in my /home/myusername directory. Is there a best practice of where to store your shell scripts for cronjobs? At the root level?
I'm running ubuntu server 12.04 right now.
1
vote
3answers
197 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
55 views
Is it possible to use cron jobs to backup both the file system and database of a WP site to Google Drive?
Is it possible to use cron jobs to backup both the file system and database of a WP site to Google Drive?
Any ideas what a script like that would look like?
SU
1
vote
0answers
119 views
CronJob for asterisk queue to reset + FreePBX
I am having problems with this script...It doesn't seem to work.
Note: It sends email just fine.
#!/bin/bash
#Reset the queue every morning at 5:00AM PST
#v 1.1 changed email
#Email alert that ...
0
votes
0answers
23 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
66 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
213 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 ...
1
vote
1answer
60 views
crontabs hour specification */1 is that the same as *
I am looking for clarification with the cron tab that I am working with.
some job 1 * * * *
some job 1 */1 * * *
Are those jobs the same? The job will run the first minute every ...
0
votes
1answer
181 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
175 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
114 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
3answers
299 views
Cronjob as root?
I'm having a bit of a problem with cronjobs for backups.
I've set up the following in sudo crontab -e (not under personal account):
0 1 * * * /backups/dobackup
/backups/dobackup contains this:
...
1
vote
2answers
833 views
Cron daemon running status check
I have a script which need to be run as cron job.
In the staging environment i could run the script as a cronjob. but in the production environment it is not working,
so i checked whether cron ...
1
vote
1answer
143 views
Where to store security credentials (aka passwords) for special cron jobs?
I want to write a cron job that authenticates for a certain mail account. As there are multiple ways in giving the script those credentails: config file, hardcoded in script, arguments in cronjob ...
0
votes
1answer
377 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
462 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
...
0
votes
1answer
245 views
copy file from different domain using cron job
I am having two domains and i need to copy some file from one domain to another.
cp http://domain1.com/test.xml http://domain2/crontest/
I tried above but it dint work. Is there any other way?
1
vote
2answers
2k 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
742 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
5k 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
201 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 ...
3
votes
3answers
486 views
Stop Cron job for a particular time interval
I have a cron job which runs every five minutes all day long.
I want to stop this cron job running on Sundays between 4pm and 5pm - it should start again after this time.
How can I script this?
3
votes
2answers
2k 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
1answer
936 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, ...
2
votes
1answer
224 views
Script to execute via cronjob that deletes all files in multiple directories
I'm hoping you can lend me your expertise.
I use shared hosting on Hostgator and need to figure out how to delete all .gz files in multiple directories every hour. I think I have the cronjob ...
2
votes
2answers
231 views
Execute a cronjob once a day, when machine is on, but not necessarily at a specific time
I want to run a cronjob once every day on a machine that doesn't run all the time, but runs at least once a day for a couple of hours. The problem with a cronjob is, that I have to give it the exact ...
0
votes
2answers
443 views
cron job not working
It is little weird now that cron job is not working as i have set. I have set weekly job to send email but i am receiving multiple emails daily. Below is my code;
# sends email every monday at 4:00 ...
1
vote
4answers
164 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
631 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 ...
2
votes
3answers
394 views
Running a cron job every other Monday
I want to run a job using crontab every other Monday. Is it possible?
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 ...
15
votes
3answers
10k 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 ...
1
vote
2answers
978 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 ...
0
votes
3answers
4k 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 ...