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

what is the meaning of *this* crontab setting?

* */1 * * * sh foo.sh I found this setting on one production machine. And foo.sh was executed every one minute. I am guessing that the original author of this setting wants it to be executed every one hour. And I cannot find the official meaning…
aXqd
  • 127
  • 4
0
votes
2 answers

cron job to archive files older than xyz days

I would like to archive all of the files older than Xdays. the files are in /home/user1/ and i would like to move the archive to /home/user1/folder_backup/ i am running ubuntu server 12
atux
  • 9
  • 2
0
votes
1 answer

Can't locate cron service, how to start it?

# rpm -qa | grep cron crontabs-1.10-5.noarch I have the above version of cron installed on my RHEL 6 server. My crontabs commands aren't reconginzed: # crontabs -l -bash: crontabs: command not found My server is remote and not internet…
Quinma
  • 103
  • 5
0
votes
3 answers

script PHP doesn't work in crontab

Good morning, I have into my ubunut server a script that check into a database some value and if the condition is true send some email. If I launch into the browser the script like: http://www.my_site.com/reports/generate.php This works, mail is…
WebDesigner
  • 97
  • 1
  • 5
0
votes
1 answer

Cron job: stdout to /var/log, stderr to email

I have a cron job that is running every hour, and providing output (over stdout) similar to the following: Found 1 batch jobs {'job': 'update'} Job 1 started at 2013-06-07 13:00:03.673683+00:00 Waiting for 1 batch jobs to complete Job 1 completed at…
Joel Cross
  • 103
  • 2
0
votes
2 answers

Crontab running when it pleases (fixed.. in a way)

I have the following line in the crontab: */30 * * * * /usr/bin/php /home/antoniocs/phpscripts/update-noip/update-noip.php This script updates my no-ip account. It also writes to a log file saying what it did and did not due. This is today's log…
AntonioCS
  • 185
  • 1
  • 3
  • 15
0
votes
2 answers

Cron job in webmin

I have a webmin on Centos server. I want to create custom cron job. However there is cron job setting options available under "Scheduled Cron Jobs" tab. But if I want to set weekly cron then there it showing me only weekly(on Sunday). Instead of…
user2206911
  • 3
  • 1
  • 4
0
votes
1 answer

crontab in different sessions

I started a crontab job in a server remotely (in a screen session) from a local machine. Days later, I terminated the screen session and restarted my local machine. The cron job in the server is still running (I'm sure about this). But using crontab…
0
votes
1 answer

Ubuntu Server scheduleing a cron job not working

I am trying to schedule a cronjob on my ubuntu server through SSL. I ran the command: sudo crontab -e Then once it created a new file for my user, I put : * * * * * php /etc/php5/apache2/php.ini /var/www/automation/cronjob_WDYCI_daily.php at the…
ShadowZzz
  • 107
  • 2
0
votes
2 answers

centos cron logs are not executed

I have been trying to setup a cronjob on CentOS but it doesn't seem to work. I have been deleting the cron's logfile to see all newly created logs and I have been restarting crond but /var/log/conf wasn't getting recreated? logrotate…
fefe
  • 357
  • 1
  • 8
  • 18
0
votes
1 answer

No way to make a specific cronjob work

I installed nginxcp on my server and they recommend to add the following cron: 0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client I already added it to var/spool/cron and restarted crond service, but it just doesnt work. From time to time, I…
valter
  • 699
  • 5
  • 13
  • 23
0
votes
1 answer

Review of a crontab script to add timestamps to minutely runs; any suggestions?

I've got a crontab job set to run minutely as such: * * * * * /home/username/public_html/domain.tld/production/scripts/cron_runner.sh My goal is to add some timestamps to output from cron so I can find things more easily with regards to some points…
ylluminate
  • 1,155
  • 2
  • 17
  • 35
0
votes
2 answers

using ssh to automatically retrieve info from remote box

Greets all. I need a 'basics-202' question answered; it's been a while. From a cronjob, how do I automatically ssh to a remote box to retrieve information that normally requires root equivalence to see? Details: all of my boxes have root logins…
user52874
  • 829
  • 2
  • 12
  • 26
0
votes
1 answer

Why this command does not work from cron.daily file?

I have a file in cron.daily: root@nagios.example.com:/# cat /etc/cron.daily/nagios-logs /usr/bin/nice -n 19 /bin/gzip --fast /var/log/nagios3/archives/* root@nagios.example.com:/# ls -l /etc/cron.daily/nagios-logs -rwxr-xr-x 1 root root 65 Apr 15…
Poma
  • 1,299
  • 6
  • 24
  • 35
0
votes
2 answers

Checking that PostgreSQL and Apache are running on Ubuntu?

I am trying to learn the best practices for checking that Apache and Postgres are running on my server. If either of them have stopped, I want to auto-restart these services. I'm using Ubuntu 12.04 LTS. My strategy, was to write a cron job that…
celenius
  • 273
  • 1
  • 4
  • 17