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
0answers
9 views

Synology jailkit debian cron debootstrap [on hold]

I have a Synology NAS. For advanced using of my server, I installed a debian with chroot-jailkit and debootstrap. I follow those instructions (in french sorry) This is working really fine. I have ...
-1
votes
0answers
10 views

How to cronjob a .sh file which contains shell script for copying files form one server to another [duplicate]

I have tried to set the cron with root access as well as without root access. I am rather new to shell script and cannot make to execute the cron for executing a .sh file. Please help guys.
1
vote
1answer
1k views

Setting 'From' header for cron email using msmtp

I've got msmtp setup on Ubuntu 10.10 so that cron can send me emails. That works like a champ, for the most part. However, emails coming to my gmail account show up as coming from (unknown sender), ...
0
votes
0answers
32 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
30 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
38 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 ...
-1
votes
0answers
38 views

ubuntu script two different outputs [duplicate]

So I have a script that checks with curl if a website is redirect. If the website is redirected, an e-mail will be sent. If the website is not redirected, an if-statement is called where I get the ...
0
votes
1answer
32 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 ...
1
vote
2answers
1k views

Capturing output from a remotely executed command via SSH fails in CRON

This question is in a direct relation to this one: ssh fails to execute remote command when run from cron bash script - works from CLI I'm not able to comment on the accepted answer as I don't have ...
0
votes
2answers
62 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 ...
0
votes
1answer
55 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 ...
1
vote
1answer
34 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 ...
-4
votes
0answers
23 views

Daily cron errors

Last time I receive on e-mail cron errors like this one: PHP Notice: Undefined property: stdClass::$response; File: /usr/local/psa/admin/plib/modules/servershield/scripts/aggregate-stats.php, Line: ...
1
vote
1answer
247 views

Reliably running background operations

I'm looking for a recommendation on how to reliably run background operations. I have many servers posting operation messages to AWS SQS, and I have another server which will run these CPU intensive ...
0
votes
7answers
962 views

vi syntax to comment out non-commented lines (cron)

Anyone know if it's possible in vi to replace only uncommented/non-blank lines with comments? If I want to replace a commented line with something I know I can use :%s/^#/##foo##/g -- but I am ...
1
vote
3answers
419 views

How can I change the default crontab editor

Can I change the default crontab editor to vi editor? If so, how?
0
votes
1answer
42 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 ...
-1
votes
0answers
21 views

How to set a cron for csf restart [duplicate]

I am trying to set a cronjob for the linux firewall csf. ( The reason is I need to make sure lfd is running, as it sometimes stops operating, for whatever reason, and yes, I am checking to see what ...
2
votes
1answer
1k views

Logrotate doesn't work from cron on CentOS

I have lograotate configured on CentOS 6. It works fine when I run it manually, but with CRON it doesn't work. Cron says in its logs: "All fine, I run you command" but nothing happens. Details: cat ...
0
votes
0answers
42 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
1answer
82 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 ...
0
votes
2answers
2k views

ISPconfig and running cron jobs as root [closed]

IPSConfig runs cron jobs as root. And when adding new cron jobs in ISPconfig it sets them to also be run as root and I don't see any way to change it. Is this safe?
0
votes
0answers
7 views

'nc' using ~100% CPU when transferring a FIFO file [migrated]

On the server which is always connected I’m using this in a crontab: @reboot nc -k -l 1234 < /tmp/fifo.fifo On the client which is not always on the network or switched on I’m using this ...
0
votes
3answers
51 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
2answers
396 views

difference between /usr/bin/php and php in crontab

What is the difference between specifying "/usr/bin/php" and just using "php" when setting up a PHP script to run in my crontab? I would tend to just use "php" rather than the full path. 30 16 * * * ...
0
votes
1answer
4k views

Cron for a user not working in Plesk 10/11 [closed]

I'm having a strange problem with plesk and I can't seem to find an answer anywhere on the official support, so I hope somebody here can shed some light. I'm simply trying to run a script via cron ...
-1
votes
2answers
19 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
18 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 ...
0
votes
1answer
65 views

Why is cron using a different Ruby than my user and how to fix it?

I have a cron job that is a Ruby script. The problem is that the ruby executable is different than expected. Ruby was installed from source so it should be the new global default. $ ssh ...
2
votes
2answers
252 views

Why doesn't this command work as a cronjob, while it works perfectly when typed in a shell? [closed]

If I run this command from the shell, it works as expected: cd ~ && mysqldump --databases --skip-dump-date --host=localhost --user=admin --password=xxxxx --lock-all-tables ...
-2
votes
1answer
40 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
39 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 ...
3
votes
4answers
2k views

Cron to run every 2nd wednesday?

I need to find a way to cron a job so that it runs every second wednesday of the month. Is this possible?
0
votes
0answers
43 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'" | ...
-1
votes
1answer
2k views

Scheduled Task issue - /usr/bin/php/: No such file or directory [closed]

Can't get it working, I want to set up a cron job for a domain user in plesk 11.5, but seems that there's a problem to find the php executable. The command is: /usr/bin/php/ -f ...
0
votes
1answer
44 views

rsync: how will rsync react to a file copy from a mounted share to a remote location?

I have a task to create a passive sync between a production server and a staging server which are located in two different geographical locations. The environment is fully Linux based (CentOS/RHEL) ...
1
vote
3answers
252 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 ...
1
vote
2answers
1k views

How do I rotate old log files to long-term backup?

I have logrotate set up to archive logs for 30 days; how do I set up my cron job to rotate them automatically from /var/log/net to the long-term storage I have mounted on /mnt/backup? I do not need ...
10
votes
4answers
40k views

How to save and exit crontab -e?

How to save and exit crontab -e? i tried every method listed here and none works, i have a centos 5, vi comes by default with yum and i installed nano Solved just changed the default editor export ...
3
votes
3answers
539 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 ...
2
votes
2answers
1k views

cron daemon forking multiple processes and running jobs multiple times

I'm running a bunch of cron jobs (set up using sudo crontab -e) on Ubuntu, and recently (though I don't know when to be sure) I'm suddenly seeing the same jobs appear to be run multiple times in the ...
-1
votes
1answer
40 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
2answers
81 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 ...
0
votes
1answer
36 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 ...
0
votes
1answer
1k views

CRON expression for firing a scheduled job between two hours including last one

I have a job scheduled via Quartz and a CRON Expression. The goal of my CRON expression is to run every 10 minutes every day between Monday and Friday between 08:00 AM and 20:00 PM and looks like ...
0
votes
2answers
42 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 in ...
0
votes
3answers
567 views

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 ...
6
votes
1answer
975 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: ...
3
votes
1answer
73 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" >> ...
-1
votes
1answer
144 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 ...