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)

0
votes
1answer
24 views

run PHP file from shell script

I have never added a cron job and am not much use with shell either... My chosen cron directory is /etc/cron.daily/ all I need my script to do is run a php file daily. I would be nice if it ran at ...
0
votes
0answers
34 views

Server crashing daily at 3:40am

I have a cloud server with rackspace. It is CentOS release 5.10 (Final). 40GB storage, 1gb ram, 2gb swap. I am running the kloxo control panel to manage the virtual hosts. Every day it eats up all ...
0
votes
1answer
20 views

Command will run in shell but throws unexpected EOF error in cron [duplicate]

I am trying to run the following in cron to back up a server every morning at 4am: 0 4 * * * dump -0uan -f - / | gzip -2 | ssh -c blowfish user@server dd of=/backups/`hostname`_`date ...
-1
votes
0answers
17 views

What is the best way to run PHP script every 30 seconds? [duplicate]

I have kind of a special requirement that is, I'm using a Raspberry Pi 2 B device to feed some data to a mysql database in a cloud serve. So I have installed LAMP stack on raspberry pi and config my ...
-3
votes
0answers
12 views

Sending Syslog information via Cron to specific user mail [on hold]

I would like to know how to create a Cron that scans the database every 2 minutes when it found severity's field equal to "critical", "error" or warning, it will send me an e-mail. thanks.
0
votes
0answers
16 views

Service for a reliable at-most-once script execution [on hold]

I have a task that I would like to reliably execute every 5 minutes, 24 hours a day. i.e. at exactly 12:00, 12:05, 12:10, 12:15, etc. I currently use bunnycron running on a cluster of 2 servers + 1 ...
-2
votes
1answer
23 views

VPS Cron and other email going to spam folder [duplicate]

I have a new vps and I need to setup some cron jobs on it to notify me of what's happening on the server. I've tested with sendmail and emails are indeed leaving the server, but on my email they are ...
-2
votes
0answers
25 views

Free Nas Cron Job not finishing [closed]

I have a simple backup archival bash script that runs every night. I have 8-10 directories for our database servers with dump files of all the databases. The script in question is supposed to loop ...
0
votes
1answer
23 views

How to detect if a longer chain of commands in cron fails?

I want to create a crontab wrapper in python that logs if a crontab entry fails. It should be useable like this: 0 * * * * cronwrapper -c "some_command | some_other_command & third_command ...
0
votes
1answer
29 views

centos 6 64bit crond not running on startup?

I have two VPS from ramnode, centos 6 64bit. I have reinstalled server 2 several times and also tried 32 bit centos 6. Same problem. Whenever I type reboot and then service crond status it says ...
1
vote
2answers
26 views

how to stop cron mail receiving in spam folder?

I have added a cron job for my incremental backup, and I configured it like this.But my mail goes to spam folder.so iclick not spam option in mail.it moves to inbox.but again it receives in spam 0 23 ...
0
votes
0answers
31 views

cron job doesn't run under specific account

I have a crontab entry on my RHEL 5.4 system under the "oracle" account but it never seems to actually run. I have the following entry: * * * * * /home/oracle/blahblah.sh > /tmp/test.log ...
0
votes
1answer
26 views

Run cron jobs in different TZs

I have several cron events that need to run but on different timezones. For example, I have one event that runs every day at 08:30 UTC, and another event that runs every day at 09:30 CET. I've read ...
0
votes
3answers
109 views

How to send an e-mail after a cron job [duplicate]

I have added a cron job for my incremental backup, and I configured it like this: 0 23 * * * /usr/bin/rsync -ravzX /mnt/external/project/ /media/backup/project/ | mail -s "Backup Success" ...
0
votes
1answer
24 views

Issues with Webalizer cron job throwing error due to file cannot open - how to Fix?

So I have a newly installed server running Ubuntu 14.04 with the default install of Sentora the free open source control panel. I did not make any customization to webalizer or cron. So I am unsure ...
0
votes
1answer
89 views

Add cronjob with bash script - No crontab for root [duplicate]

I have a deployment script and in it I'm trying to add a cron job. This is the code I am using which I found on stackoverflow. I'm running debian 8. # ADD CRON crontab -l > mycron echo "10 * * * * ...
0
votes
1answer
32 views

Disable cron jobs or cron daemon on Ubuntu 10.04 server in rescue mode

I am trying to recover an Ubuntu 10.04 server in rescue mode and I want to stop cron jobs and/or cron daemon running on reboot. So far I have: Edited the cron files in /var/spool/cron/ renamed ...
0
votes
2answers
22 views

Crontab, keep output log, but disable email sending

For now I have crons like : 45 * * * * www-data php /var/www/console cmd:dispatch --env=prod 2>&1 > /var/log/cron/cmd_dispatch.log And I'd like to disable email sending. In order to ...
0
votes
4answers
43 views

Is it possible for a cronjob to start before MySQL starts?

I am on CentOS 7, and if I put: * * * * * python script.py It works. If I put: @reboot python script.py Then it says it cannot connect to MySQL. If I run it from command line too, it works. ...
1
vote
1answer
52 views

Why is PATH wrong with cron entry? [duplicate]

I have an entry in cron.d: 31 17 * * * root /home/some_user/.bash_profile; /home/some_user/bin/some_script The profile sets a specific path, and I echo the current path in the profile to ensure its ...
0
votes
1answer
36 views

Crontab is delayed by 2 hours [duplicate]

I have got a problem with two crontabs that execute some operations on my website: the first one run a command every 3 minutes and the second one at 5am in this way: m h dom mon dow command 0 ...
0
votes
1answer
142 views

Inside Docker container - crond running but no cronjobs executed

I have built a container from a Dockerfile, based on an Archlinux base image. Using a "RUN" command I have installed "cronie", since Arch does not come with any form of cron. Now, after the container ...
1
vote
3answers
42 views

Monitoring file for changes and immediately take action on change

How can I constantly monitor (small) file for changes? Eg. when file is updated (action from web application), a script is executed (if not already running). Right now, I do it every minute using ...
6
votes
1answer
156 views

cron job occasionally not running

I have a CentOS 6.6 server with the following packages installed: crontabs-1.10-33.el6.noarch cronie-1.4.4-12.el6.x86_64 cronie-anacron-1.4.4-12.el6.x86_64 kernel-2.6.32-504.3.3.el6.x86_64 ...
0
votes
0answers
58 views

Cron not running at specified time

I have a new Centos 7 system and having a trouble with cron jobs not runnning at the specified time: [root@media cron.d]# cat /etc/cron.d/rsnapshot 30 02 * * * root /bin/rsnapshot daily 00 02 * ...
-1
votes
1answer
85 views

Run cron in centOS as user process, not daemon

According to this site, an easy way to set up a scheduled task in a single Docker container is to create a single crontab that runs your task, and then invoke it as the last Docker CMD with the line ...
-2
votes
2answers
41 views

What shell is used by cron?

cron runs shell commands from crontabs. But having just got caught out by the differences between zsh and bash, I'm now concerned that I don't know which shell cron uses to interpret crontab ...
0
votes
1answer
151 views

Timezone issue with cron inside a Debian Docker container

Here is my Dockerfile (or at least the interesting part): FROM debian:7 MAINTAINER pjb <pjb@example.com> RUN apt-get update && apt-get install -y build-essential ntp cron ADD ...
0
votes
1answer
149 views

openshift, cron, node, line 1: syntax error near unexpected token `('

I'm pretty sure this is some kind of config problem, or something like that. I'm using node V 0.10 and the cron cartridge V 1.4. Here's my bash script to run my node script: #!/bin/bash node ...
0
votes
2answers
80 views

mysqldump connects as different user from cron and from command line

I had a bug in a backup script running as a cron job which I found and corrected, but I'm still puzzled by the fact that this bug did not show up when the script was started from the command line. The ...
1
vote
1answer
55 views

Cron errors routing to external mail server instead of local

For some reason some usernames on a Solaris 10 system that have cron jobs send the cron errors to an external mail server to be routed back to the generating server which is blocked because of ...
0
votes
1answer
90 views

“NTP socket is in use” messages from ntpdate in syslog

In cron.log I can see that ntpdate is being triggered from a cron job which is running daily at 23:15 Mar 10 23:15:01 seitan /USR/SBIN/CRON[22407]: (root) CMD (/etc/network/if-up.d/ntpdate) But ...
0
votes
0answers
165 views

php curl does not execute url

Im writing a php cron script that needs to run a url After some database modifications the php script needs to execute an url $url = ...
0
votes
3answers
80 views

Load users environment variables in a cronjob

How can I load the users environment variables in a cronjob? I have a cronjob which should start a script every minute on my Ubuntu machine: * * * * * /home/user/myscript.sh; In this script I ...
0
votes
1answer
255 views

Errors when running cron: grandchild #10010 failed with exit status 2: 1 Time(s)

In recent weeks I have seen this type of error many times on my debian 6 servers. I have seen different exit status, 1, 2, 25, 255 Errors when running cron: grandchild #10010 failed with exit ...
-1
votes
2answers
39 views

Symlink in crontab, script not found [duplicate]

I'm running Debian testing and can't get a simple cron to run a symlinked PHP script. I've a php script in a subdirectory in my home folder /home/foobar/dir/script.php (which starts with the ...
0
votes
1answer
25 views

Debian: environment variable not available for script running from cron?

I have this line: echo $(date '+%Y %b %d %H:%m') Your output $HOSTNAME When I do it manually from command line I can see my $HOSTNAME just fine. However, when it's running from a script that's run ...
-2
votes
1answer
42 views

Impossible to add a script to cron [closed]

I am trying to add a script to cron jobs to be played daily. I tried multiple things but no one seems to work. First I tried to add a script in cron.daily: It s not triggered. #!/bin/sh cd ~/foo/ ...
0
votes
1answer
62 views

cronjob executing mysql and get root access denied

cron job file: 46 13 * * * root /home/tmp/test_mysql.sh script: execute_query(){ query="$1" res=`mysql --skip-column-names -e "$query"` echo "$res" } res=`execute_query "show ...
0
votes
0answers
68 views

crontab at reboot for EC2 instance

I'm trying to mount an EBS volume after restart. It does not work. I set the mount after reboot, in the following manner: echo "@reboot 'sudo mount $DEVICE_PATH $TARGET_PATH -O noatime,noexec'" | ...
3
votes
3answers
564 views

Why cd does not change current directory in crontab?

In my user's crontab, on a CentOS system, I have something like this: 58 12 * * * cd /home/joe/dev; echo `pwd` | logger This outputs in /var/log/messages: Feb 19 12:58:01 srv01 joe: /home/joe ...
-1
votes
1answer
54 views

crontab grep function execution [duplicate]

When I tried exection grep function in particular directory its working on that directory but when I am trying to execute using absolute paths grep is not working for example grep `date +%Y-%m-%d` ...
0
votes
1answer
72 views

CSF not adding IPs to deny file as a cron during high loads

I'm running a cron every minute to thwart brute-force attacks. awk '{print $2}' < ipkill.txt | while read ip; do #query geographical info IP address curl -o country.txt ipinfo.io/$ip ...
1
vote
3answers
328 views

Using nice scheduling priority with tar/gzip cron script

I do large backups that put huge strains on my server when using tar/gzip. I've got the task setup as a cronjob which accesses my script that handles the backup. I know that nice might be able to ...
0
votes
2answers
50 views

Cron job ignores part of trigger url

I created a cron job to trigger a url at set times, which in turn starts a product import script. But for some reason part of the trigger url with parameters is stripped away. I set the cron job like ...
0
votes
2answers
191 views

/etc/crontab file not executed

I created a dummy entry in /etc/crontab, but it doesn't get executed according to cron log /var/log/cron: Feb 7 08:20:01 localhost CROND[22781]: (root) CMD (/usr/lib64/sa/sa1 1 1) Feb 7 08:30:01 ...
-1
votes
1answer
394 views

Cron job is not working in centos 6.6

I have dedicated server having centos 6.6 and centos webpanel. Now I'm trying to set cron job from centos web panel. I had tried so many commands to run one php file each and every minute, but still ...
3
votes
1answer
407 views

Cron job as root need to sudo to another user [duplicate]

RHEL6 In root's crontab a have: * 21 * * * /root/script.sh In script.sh there is a line: /usr/bin/sudo -u jira bash -c 'cd /opt/jira/bin; ./stop-jira.sh' && echo "Jira Shut Down" >> ...
6
votes
1answer
990 views

amavis cronjob throwing an error out of nowhere

Can someone explain why amavis cronjob is suddenly trowing the following error? Cron <amavis@bee> test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-sync rules: ...
0
votes
0answers
28 views

why is cron flooding wtmp and last?

When I type the last command, I see a bunch of entries in there for cron. Every single cron job that gets run creates an entry and it's flooding wtmp with unnecessary entries. Any ideas how I can stop ...