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.

learn more… | top users | synonyms (2)

1
vote
3answers
115 views

keeping a remote server up to date with git repo

So, I'm aware of git hooks, and will be looking into those next, but want to write a simple bash script, run via cron, to keep a repo on a remote server up to date. I imagine it working like this: ...
0
votes
1answer
110 views

Adding OpenVPN client connection to cron [duplicate]

I wrote simple server-client OpenVPN config files: server.conf dev tun0 ifconfig 10.8.0.1 10.8.0.2 client.conf dev tun0 ifconfig 10.8.0.2 10.8.0.1 remote 192.168.0.123 which basically is a ...
5
votes
3answers
384 views

Cron expression: difference between 0/1, 1/1 and *

In a cron expression, what is the difference between 0/1, 1/1 and * ?
1
vote
3answers
74 views

crontab cannot find script

I have a cron job that runs under my user once per night. I installed it using crontab -e and a by adding the line: 0 1 * * * /home/username/diskreport.sh The crontab is set up so that ...
2
votes
1answer
59 views

Disable mailing in cron globaly

The web is full of suggestions how to disable mailing in cron like asked here stop linux from emailing me cron errors?. Is there really no global config flag I can set to disable mailing in cron for ...
0
votes
2answers
38 views

How to automatically send email when process is using more than xxxMbit/s

I haven't found anything for that. How could I automatically send an email (via crontab) with the ID of the process, the user & finally what's the name of the process for example when this process ...
0
votes
0answers
16 views

How do you setup a solid CRON job for a PHP process? [duplicate]

After lots of googling I have come up with something like the following to execute a PHP process every hour. However, it doesn't seem to work and there doesn't appear to be any errors in the syslog or ...
0
votes
1answer
42 views

Windows Scheduled tasks ends prematurely, so server doesn't run

I'm trying to run Django on my Windows Server 2008 machine. I can do this manually by calling python manage.py runserver 54321, which launches Django's server at http://127.0.0.1:54321 -- then I can ...
1
vote
0answers
82 views

Root cron job can't read file from /root/

I've got a cron job in root's crontab defined like this: 0 1 * * * /usr/local/bin/tarsnap-backup-script > /tmp/tarsnapcron.txt 2> /tmp/tarsnapcron.err The script is a python script that ...
0
votes
1answer
76 views

Why is cron running twice?

I wanted to execute my PHP mailing-script automatically with cron. I always get the mail twice though. The script runs fine when started manually. I put this in the crontab for testing: 54 13 * * * ...
1
vote
1answer
41 views

Is it possible to make an individual daily cron run with UTC time while keeping the system localtime?

I have a cron script under /etc/cron.d as so: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 0 0 * * * root /usr/local/sbin/app_logrotate >> ...
0
votes
1answer
204 views

Compress and remove logs from jboss on linux with cron

I need to compress and remove log files after some time from serwer. I have never write scripts before. So far i have script logs.sh: #!/bin/bash LOGS=/usr/local/jboss/server/default/log/ ...
3
votes
1answer
119 views

Wheezy processes die periodically

I have a very weird problem. Certain processes on my mail server, but not all, die periodically (every second month or so). A few of the process that die are: ssh dovecot postfix Processes that ...
2
votes
2answers
115 views

Exim - Force Messages to domain before retry time

We have exim running in queue-only fashion. The reason is that we are a bulk sender (a legitimate, double opt-in) and have experienced Yahoo and Hotmail throttling. The best practices state that once ...
1
vote
0answers
31 views

Won't keychain --clear in .bash_profile interfere with cron jobs?

Keychain tutorials recommend adding /usr/bin/keychain --clear to ~/.bash_profile to only allow cron jobs to use passwordless login. I'm not sure I understand how this works. If I take it right, the ...
-1
votes
2answers
31 views

Crons excluding specifc time ranges [duplicate]

I have many crons that run at different intervals. I need to configure them all to not run between two specific time ranges. How can I configure a unix cron to run exclusive of 11:45-13:00 and ...
1
vote
2answers
243 views

Linux Bash IF conditions not processing when running as crontab

So I've made myself a little script which monitors my served directories for any PHP files which have changed. It's designed to run every 5 mins from crontab and email me any changes so that I can ...
-1
votes
1answer
44 views

Crontab not executing [duplicate]

I'm running CentOS 6.2, trying to run tasks through cron. I've verified crond is running $ service crond status crond (pid 20553) is running... I have no /etc/cron.allow file, but I do have an ...
1
vote
1answer
53 views

Cron not running script [duplicate]

I have a script that works when called: /usr/local/bin/myscript #this works fine Permissions for the file are: -rwxr-xr-x 1 root root 155 Jan 27 09:34 myscript I've added a line to /etc/crontab: ...
0
votes
0answers
48 views

Postfix/Dovecot Service

I have installed Postfix 2.10.2/Dovecot 2.2.5 on RHEL 5.9 from a source code, I forced Installation to be in my own directories not Defaults, I need to add Postfix/Dovecot under services or init.d to ...
0
votes
1answer
62 views

Change cron.daily run time on ubuntu

Am I correct in understanding that to update the time that a daily cron job runs (from /etc/cron.daily/), all I need to do is update the /etc/crontab file? Are there any risks I should be aware of ...
0
votes
2answers
269 views

Why unison does not run in cronjob?

I want two way data sync between two CentOS based servers, so I installed Unison on both of my CentOS servers. I made a script file on root which runs unison and works fine, and syncs the files, when ...
0
votes
0answers
24 views

Difference between 2 crontab settings [duplicate]

Can anyone tell me difference between following crontab settings : 5 00 * * * /myscript.sh >> This means for every 00:05 and 5 * * * * /myscript.sh >> The second '*' is for hour ...
0
votes
2answers
59 views

Cronjob screen PHP does not executed [duplicate]

If I execute the following in the terminal it works: screen -dmS tt-rss-daemon sudo -u www-data /usr/bin/php /usr/share/nginx/www/tt-rss/update.php --feeds --daemon If I write the following in a ...
0
votes
2answers
275 views

Cron task error: WRONG FILE OWNER

I'm using the /etc/cron.d/ folder to store my cron tasks. These tasks are symlinks to my actual file which is kept under VCS. These files are owner by a user named "www-data". I've read that Cron will ...
1
vote
1answer
131 views

Issues with MySQL restart on running through a crontab scheduler

I have written a shell script which starts MySQL when its killed/terminated. I am running this shell script using a crontab. My cron looks for the script file named mysql.sh under /root/mysql.sh ...
1
vote
0answers
20 views

crontab not outputting to log when cronlocks removed on some files

I'm running a variety of crontab curl requests and I'm not sure why SOME of them stopped outputting the contents to log files. The only change I made was removing cronlocks from all of the entries ...
-1
votes
1answer
134 views

VPS debian 64 bits put cron to reboot at 7:00 every day

I have a VPS with debian 64bit. And I would like to set a daily reboot at 7:00 with $ ps aux root 1844 0.0 0.1 18832 964 ? Ss 07:23 0:00 /usr/sbin/cron so the cron it's ...
0
votes
2answers
44 views

how to prevent crontab logs from registring in syslog?

I have separate my crontab log into cron.log file by uncommenting the below ling in /etc/syslog.conf, But it register in syslog too. cron.* /var/log/cron.log How ...
-1
votes
1answer
206 views

Crontab is Not Running Crons [duplicate]

I have crontab setup on my CentOS VPS and it is not running... Here's the cron file: * * * * * php -f /var/zpanel/hostdata/zadmin/public_html/pingrglobe_com/crons/1min.php * * * * * php -f ...
2
votes
1answer
47 views

CRON job running but no sign of it in any file

This is an odd one and I know that the answer will be something simple that I have over looked... I have inherited responsibility for a Linux server running an old version of Ubuntu 10.04, it has a ...
1
vote
1answer
52 views

Script won't do what it should when run with cron

I've got some problem. I have script execution scheduled but when time comes nothing happens. #!/bin/sh TIME=`date +"%d-%m-%Y"` cd /var/www/flyer/data/www/ mysqldump -u root -ppasswd --databases ...
-3
votes
3answers
150 views

Mysterious automated emails

I remember messing around with crontab and setting up email capabilities on a server many months back, and now all of a sudden I'm getting the following email: EMAIL HEADER: from: root ...
1
vote
1answer
112 views

One-line backup, compress, scp database file

I support a company with a remotely hosted web site. They use PostgreSQL dbs. I can't write scripts on the remote server, and I don't want to store any backup files on the remote server, but I can ...
-1
votes
1answer
106 views

Restart crontab @reboot rule without actual reboot

I'm using crontab with a @reboot entry which starts a script containing a endless while-loop that is processing the output of a tail -F command. Is there any way to stop the currently running script ...
0
votes
1answer
131 views

Proxmox cron.daily log error

I am having a problem with cron.daily job in Proxmox. Its giving me this error: /etc/cron.daily/pve: Can't stat /var/log/pve/tasks/6: No such file or directory at /etc/cron.daily/pve line 78 The ...
1
vote
2answers
176 views

How does Cron interact with Kerberos for authentication?

I have a CentOS 6.4 machine which is set up with pam_ldap and pam_krb5. It is configured to use our Active Directory servers for authentication. I can SSH into the machine using AD accounts. I have ...
0
votes
1answer
88 views

How can I control a gradual file upload with cron or similar? [closed]

I have several terabytes of data I need to back up to S3/Glacier over a slow link. I want to upload from, say 9pm to 9am and resume from where it left off. Is there free software that would do that ...
-1
votes
1answer
48 views

Configuring / Securing credentials required by batch job

I have a batch job which should run as cron job on a Linux server. This job requires some credentials to do it's work. Idealy I don't want to have that kind of credentials stored on my server, but ...
0
votes
1answer
37 views

cron to anacron migration process

I have a script that I want to run nightly on my lab's RHEL 5 and 6 workstations, so I'm deploying the script to each system's /etc/cron.daily/ directory and making it executable there. But some ...
0
votes
1answer
303 views

Cron won't use msmtp to send emails in case of failed cronjob

I'm trying to configure a machine so that it will send me an email if one of the cronjobs output something in case of an error. I'm using Debian Wheezy. Cron is working normally (without the email ...
0
votes
0answers
16 views

rdiff-backup failed due to target machine being down, but is unkillable

My backup script was invoked by cron, using rdiff-backup to backup the user files onto a target system in the network. That target computer went down at some point, yet still appeared as mounted on ...
2
votes
1answer
95 views

Why is cron mailing me program output even though I've redirected to /dev/null?

I'm trying to restart a system process through cron and getting emailed the startup output of the process. I thought redirecting STDOUT and SDTERR to /dev/null would "silence" the output but alas, ...
0
votes
0answers
37 views

Cron: Get an email only after the nth error?

I have the following entry in my crontab to fetch emails from my freemail account: */5 * * * * getmail --rcfile gmx > /dev/null Every now and then, the server of the provider has some ...
0
votes
0answers
38 views

need at jobs identified by name (advanced atd daemon)

Sometimes I'd like to delete or overwrite (or simply cat) an at job. Unfortunately, the at jobs are identified by a sequential number (file in /var/spool/cron/atjobs), which makes those operations ...
0
votes
0answers
59 views

Cron Jobs unable to deliver email error report

I am sure I have right syntax and I am still unable to receive report emails to my email address. My OS is CentOS 6.4. My Crontab script is MAILTO="cron@mydomain.com" * * * * * /usr/bin/php5 ...
2
votes
2answers
48 views

Including file into crontab config?

I'm trying to put project specific crontab config into code repository to make it easy to update cron jobs on all backends when deploying. Is it possible to include files into crontab config? ...
0
votes
2answers
954 views

Centos backup mysql using cron job

According to this tutorial http://www.a2hosting.com/kb/getting-started-guide/backing-up-your-data/backups-on-dedicated-servers-and-vps trying to backup mysql database I did: 1) created folders in ...
1
vote
1answer
421 views

Crontab maximum command length

Is there a limit of characters a command in a crontab could be ? I have a crontab with a 178 characters command and it seems to be truncated at 164 when executed. I can tell this number from the ...
0
votes
1answer
72 views

Unable to get cron to append output from wget

I have a cronjob setup and running, but the logfile keeps getting overwritten every time it runs. I would like for the wget output to be appended each time the cron runs. Why is this and how do I fix ...