Questions tagged [cron]

Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.

For information about the most common cron issues and how to fix them, see Why is my crontab not working and how can I troubleshoot it.

1957 questions
0
votes
1 answer

Where does cron store the real-time stderr logs?

I've got a cron job configured to run a command like some-command 2>&1 >/dev/null | tee -a /tmp/some-command.STDERR.$(date +\%Y-\%m-\%d.\%H.\%M) I've also got a tmpreaper cron job that tidies up older logs. Every now and then a process goes haywire…
Chris Conway
  • 111
  • 3
0
votes
1 answer

run multiple instance of same php script from bash

I am running a cron job to execute a php file multiple times per minute like this * * * * * /usr/bin/php /var/www/html/myFile.php >> /var/www/html/cronlog 2> /dev/null * * * * * sleep 10; /usr/bin/php /var/www/html/myFile.php >>…
t q
  • 253
  • 1
  • 5
  • 15
0
votes
1 answer

How can I know which user has cron jobs configured on a machine with 200+ users?

I need to build a new machine and copy properties and some cron jobs from another machine which has about 200+ users and I don't know which users have cron jobs configured. Is there a way to extract the list of users which has cron jobs configured?
Itai Ganot
  • 10,644
  • 29
  • 93
  • 146
0
votes
1 answer

Binding timestamp value to a variable in crontab

I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far. php = '/usr/bin/php' dir = '/var/www/bkd' logs =…
mk_89
  • 125
  • 1
  • 2
  • 8
0
votes
3 answers

What's the simplest test that I can do to check if my cron jobs are working?

What's the simplest test that I can do to check if my cron jobs are working?
Randell
  • 1,173
  • 8
  • 18
  • 26
0
votes
1 answer

Periodically run an MS SQL query on multiple sites

I have been tasked with pushing Google Analytics data periodically to SQL Server 2005 running on a different server from various websites (about 450 of them) grouped on various servers. I understand I can run PDO queries with PHP to write to the SQL…
0
votes
2 answers

rsync last 3 days plus weekly backups

I have a shell script that i'll be running with a crontab. Basically I want to modify this so I can do daily backups for the last 3 days. I've seen examples where the last 7 days are backup. I just need the last 3 rolling days. I know I would have…
0
votes
1 answer

Ubuntu 10.04 cronjob with curl dosen't work

I would like to execute some php script via cron job i have curl, crontab installed, but the cron job dosen't run/create any log file. crontab -l * * * * * curl http://www.mydomain.com/index.php?r=myController/myFuncction >>…
Nagy Ervin
  • 109
  • 4
0
votes
6 answers

munin-cron Unable to Copy Contents

I recently installed munin on my (Fedora12 based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file /etc/munin/munin.conf by setting the htmldir as the absolute path to my…
Ranveer
  • 111
  • 1
  • 6
0
votes
1 answer

can I use @reboot in cron.d files?

I want to run a job with cron on reboot as a particular user. I have been able to do this successfully using crontab to write to /var/spool/cron/crontabs/username with something like: @reboot ./run.sh >>~/tracefile 2>&1 However, I want to use…
fschwiet
  • 272
  • 1
  • 8
0
votes
1 answer

Why does my cron job sometimes fail on wget: unable to resolve host address

My cron job runinng properly .But sometimes it get fail with following error message" failed: No address associated with hostname. wget: unable to resolve host address "
GkDreamz
  • 13
  • 3
0
votes
1 answer

how to increase the size of /var/log/cron on cent os 6.4

how to increase the size of /var/log/cron on cent os 6.4. I wanted to keep the logging history longer. Thanks!
Pavan
  • 13
  • 2
0
votes
1 answer

Shell script only executes partially when run with CRON

I've written a shell script that does the following: Retrieve mail from a POP3 account (using GetMail) Save a copy of that email to S3 (using AWS CLI) Email me the filesize of the email The script runs fine manually, and technically runs from…
binaryorganic
  • 6,021
  • 4
  • 18
  • 19
0
votes
1 answer

logwatch on Centos 6.4

My logwatch is configured correctly and is working correctly when I issue manually /usr/sbin/logwatch I added it to root's crontab and it is listed correctly when I make crontab -l which gives: 0 5 * * * /etc/cron.daily/0logwatch 0 2 * * *…
mmonem
  • 209
  • 1
  • 2
  • 9
0
votes
4 answers

cron job executing script

I have created a script that works as expected in shell but cron job does not seem to run it. when I check my cron mail, I see that it prints "hltv is not running" but does not create a screen session. #!/bin/bash if [[ $(netstat -a | grep '27027')…
sylar
  • 101
  • 1