Questions tagged [cronjob]
The cronjob tag has no usage guidance.
90
questions
0
votes
0
answers
52
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
1
answer
370
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.
2
votes
2
answers
5k
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 every ...
3
votes
1
answer
2k
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
2
answers
1k
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
2
answers
1k
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
1
answer
1k
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
3
answers
1k
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
2
answers
5k
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 ...
2
votes
1
answer
3k
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 call,...
1
vote
2
answers
3k
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
0
answers
2k
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
1
answer
1k
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?
11
votes
5
answers
30k
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
2
answers
5k
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 ...