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
51 views

124 emails sent at once while one should be sent every five minutes by cron if a certain web service stops running

So I set up a simple script to send an email alert when a certain web service stops running. It has a simple flow of: test = $( curl [address] | grep [a certain string in response] | wc -l ) if [ ...
3
votes
1answer
162 views

How to schedule a Cron job for the second to the last day of each month

I want to schedule a task for the second to the last day of each month. I have read this great article about shell scripting the execution. I have also seen that you can use "L" to represent the last ...
0
votes
1answer
17 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) ...
-2
votes
0answers
19 views

AWS EC2 - Crontab running every minute instead what I set up

I'm trying set a crontab to run some URL every 30 minutes. I wrote that in crontab -e: 0,30 -links -dump [MY-URL] It is running, but not every 30 minutes, but every minutes (or maybe few seconds, I ...
0
votes
1answer
28 views

Cron job running at 12.00 AM despite changing its time [closed]

I have only one cron configured in cPanel for WHMCS to run once per day at 12.00 AM. The cron sends daily activity logs to my email. A problem came up recently in which cron job activity logs sent ...
2
votes
1answer
22 views

Do cron and atd run jobs with the same user, permissions and environment?

What's the difference between running a bash script via cron and running the script via atd? Is there any difference? Is it specific to the distro? If so, what about SLES 11?
-5
votes
0answers
50 views

sh script runs manually but partially through cron job

I am new to linux. I am trying to run the below mentioned linux script which in turns calls the main method in my jar MyCode.jar. SCRIPT: #!/bin/sh HOME=/path to/directory CLASSPATH=$HOME ...
-1
votes
2answers
40 views

Start Tomcat through cronjob

To make sure that Tomcat is running all the time, I wrote the following shell script #!/bin/bash status="$(curl -s http://www.domain.com/check)" if [ "$status" != "OK" ] then ...
0
votes
1answer
54 views

How can I tell a script is running under cron?

Is there a standard way to know if a shell script is running under cron as opposed to running from the command line. i.e. I'm thinking of running with more verbose output when manually kicked from the ...
0
votes
2answers
13 views

Do i need to restart after editing anacrontab?

To help trouble shoot a few servers, I have edited the delay time in anacrontab. Do I need to restart anything for these changes to be applied? Thanks
1
vote
2answers
52 views

cronjob not running daily

I am a linux newbie. With that said I need a cronjob to compress some syslog files after 48 hours to keep the size manageable. These files are currently located in /syslog - a disk I added to handle ...
0
votes
0answers
48 views

How to execute php files from crontab by plesk user

I'm trying to get a php file outside of a web users root to execute from the ~USERS~ crontab file in plesk [/var/spool/cron/username] I can get it to execute from the command line and from the ...
0
votes
0answers
18 views

terminal linux calendar specify used calendar file [migrated]

I´m playing around with linux calendar My aim is that all users can run a script which does nothing more than adding a givven argument in 10 days as cal item // called like this: reminder "Meeting ...
-4
votes
1answer
49 views

Crontab - I have two cron jobs but only one works [closed]

I use ubuntu 14.04 LTS. I have created 2 cron jobs but only one works. The 2 different website building with drupal cms. */5 * * * * curl -s ...
1
vote
1answer
38 views

WP-CLI doesn't run from cronjob

I made a bash script that uses WP-CLI and was intended to run from a cronjob. It runs fine from SSH, but fails when run through cron. During debugging I discovered that it was the WP-CLI part that ...
0
votes
2answers
37 views

Odd Crontab Service SMB Restart Issue

System: Debian Wheezy x86_64 Service: Samaba So when i'm in a terminal i can use service samba restart or /etc/init.d/samba restart to restart the service. When I create a cronjob and do ...
0
votes
0answers
23 views

cron job time managment

I have cron job A and B (both jobs run every minute) from 9.00AM to 6.00PM I like to make the second one run after the first one in 30 second.both cron job should be run by root user. for example if ...
3
votes
1answer
133 views

Cron Daemon Wget blocked

I've got Nginx on Debian 7 without cpanel. I am seting-up my Crontab like this: */45 * * * * wget "http://example.com/cron-url.php" >/dev/null 2>&1 The above cron is being blocked with ...
0
votes
1answer
30 views

Wal-E cron job not executing

I have a cron job setup that is suppose to be running the wal-e backup-push command. The command works fine if manually ran through the command line. As the postgres user of course. So I setup a cron ...
0
votes
2answers
58 views

Add cron job to save a web link into txt file

I need to setup a cron job to save a webpage info into a text file in a specified folder at every hour. here is what I've tried: crontab -e in insert mode I typed: 0 * * * * wget http : // ...
0
votes
1answer
34 views

Check how much time has elapsed for Cron job and send email

There is a cron job that is set which runs throughout most of the day, sometimes the job gets stuck and I would like to set a time or check on it which let's me know if it has been stuck for more than ...
0
votes
1answer
23 views

cron: What means mail error status “0x0002#012”

I have a cron job specified in the crontab: ... MAILTO=root ... ... 47 09 * * * tst nice -n 15 /opt/tst/bin/doMirror ... The doMirror script fails because of a syntax error. I had expected that the ...
2
votes
2answers
20 views

Is it possible to determine if a job is being started as an at job (kicked off via atd/cron)?

Is there a way to identify a script is being run as an at job instead of interactively from the shell by a user? Some of our scripts have a guard to check if they're running in screen by checking ...
-2
votes
1answer
46 views

Restart periodically two linux server with master slave dependency

My system is configured as follows: database server on a linux server web application on another linux server For sanitation purposes I would like to restart these servers during night at least ...
0
votes
1answer
44 views

Ubuntu VPS not running cronjob [duplicate]

I used sudo crontab -e to add the following cronjob 0 0 * * * /usr/bin/php /var/www/path/to/artisan elite:reset-user-likes The command works correctly if a type it myself on the terminal. I also ...
-1
votes
1answer
29 views

Why does nvi think I have files being editing?

I've got a couple of FreeBSD servers that throw several copies of the following error on reboot: On Wed Oct 10 15:13:16 2012, the user root was editing a file named /tmp/crontab.s00huOAZD2 on the ...
2
votes
1answer
28 views

User crontab not accessible

I cannot edit my user crontab without being superuser. I expected the following to work, but I get an error message: $ crontab -e crontabs/gauthier/: fdopen: Permission denied The following is ...
1
vote
1answer
80 views

OpenShift cron does not run

I have the following file [subdomain.rhcloud.com minutely]\> pwd /var/lib/openshift/username/app-root/repo/.openshift/cron/minutely [subdomain.rhcloud.com minutely]\> ls -lha total 4.0K ...
1
vote
1answer
48 views

Is there a way to check the syntax of a crontab file without actually installing it?

I know that "crontab -e" performs a syntax check before attempting to install an edited crontab. However, I am looking for a way to verify that the syntax of a crontab file is correct, even if: the ...
1
vote
1answer
145 views

“apt-get -y upgrade” in cron task runs but does not upgrade the system

This server runs Debian 7 and I'm facing a big mystery. Here are my cron tasks: $ sudo crontab -e 42 15 * * * apt-get -y update >> /var/log/my-apt-update.txt 52 15 * * * apt-get -y upgrade ...
0
votes
1answer
49 views

Cron needs restart in order to process modified /etc/crontab

I know there are many questions about this which say it will work right away. Alas, at least on our newer SLES (Suse Linux Enterprise) 11 SP3 systems, that no longer seems to be the case. (You have ...
0
votes
0answers
31 views

Can anyone please explain how to fix the following errors on RSNAPSHOT?

Some errors occurs during the daily backup of VM's at 1am and is mailed daily with the following output. ***MAIL CONTENT*** ERRORS ERROR: Warning! Could not symlink("PAM.7.gz"), ...
5
votes
1answer
173 views

Cron daemon reporting “unknown user 'tomcat6'” every day since I removed tomcat

I'm running Ubuntu 12.04. Since I removed tomcat via aptitude purge the other day, I keep getting the following error from Cron daily: /etc/cron.daily/logrotate: error: tomcat6:7 unknown user ...
1
vote
2answers
103 views

cron job sending emails in a wrong charset

I have following command in a cronjob: */5 * * * * php /var/www/domain/yii rss/parse It outputs email in a wrong charset: Content-Type: text/plain; charset=ANSI_X3.4-1968 But when i launch that ...
0
votes
1answer
47 views

Unable to send external email via crontab

I'm trying to send email out from crontab. I've tried making crontab run a basic shell script, as well as specifying the actual command within the crontab. I've tried doing this with mpack and ssmtp . ...
0
votes
1answer
30 views

Send email on ldap creation

I have an LDAP server setup on a server running Debian 7 and I wanted to make it send out an email whenever a new user was created on that LDAP. I thought a cronjob would be best, but I have no idea ...
0
votes
1answer
130 views

Cron occasionally fails with “grandchild #X failed with exit status 3”

I have cron jobs and every now and then they fail. Just after log message that the command has started, there is grandchild #X failed with exit status 3 message. On the next run scripts finishes ...
0
votes
1answer
88 views

Openshift cron not working

I'm using OpenShift and I have a shell script that is executable and can be run from the command line, however cron doesn't seem to even attempt to run it. I have placed my shell script in ...
0
votes
3answers
963 views

root + crontab : permission denied [duplicate]

I'm using Debian 6, all patched up, but when I try to access crontab as root, I just get a permission denied: root@server:~# crontab -e -bash: /usr/bin/crontab: Permission denied Please note this ...
-3
votes
1answer
361 views

Cron jobs fail to run on raspberry pi (STAT FAILED shows in syslog) [closed]

I have a Raspberry Pi server in a remote location (it's a weather station). I have set up a few python scripts that I would like to run via cron. Sometimes, everything works fine. Other times, none ...
-1
votes
1answer
53 views

How can I flush and/or rotate cronevents?

Can anyone tell me how I can flush / clean / zeroize or better still rotate the contents of cronevents? I need to solve this, because I am attempting to 'productionize' my fileserver instance-pair ...
0
votes
1answer
42 views

CURL isn't running from Crontab

Here is the output. Not sure if cron isn't running or other issue. If I issue curl --silent http://..../scanner.php from terminal, I'm getting desired output. Actually scanner.php do some check and ...
3
votes
1answer
155 views

How can I find what's starting crond?

I need to stop crond at the command line. (I'm writing a script which needs to stop it, do some work, and then start it again. I'd rather not remove and replace the crontab file because it's more ...
0
votes
1answer
64 views

Automysqlbackup - dumped files have wrong permissions

This question has been askewd here. But it was not answered. I just got a 3rd server and on all 3 servers I use Automysqlbackup script to create MySQL backups. I do it with cronjob: 52 04 * * * ...
1
vote
2answers
67 views

Hourly Clamscan cron script failes at reading file list

I've this piece of code located in /etc/cron.hourly/hourlyclamscan. #!/usr/bin/bash # Create Hourly Cron Job With Clamscan # Directories to scan SCAN_DIR=/home/transmission/Downloads # Temporary ...
0
votes
2answers
414 views

Is there a way to restart automatically the HHVM service if I get a '502 Bad Gateway Error'?

I've reported the error on stackoverflow - from time to time my Nginx/PageSpeed+HHVM+MariaDB+WordPress blog stops working. There is some problem with the HHVM service that I don't locate, and I'm ...
-1
votes
2answers
362 views

Cronjob run every two weeks, on Saturday, starting on this saturday [duplicate]

Today is Friday, October 3, 2014 3:58 AM I want to schedule a cronjob like that to run it at the following dates: Saturday, October 4, 2014 8:00 AM Saturday, October 18, 2014 8:00 AM Saturday, ...
0
votes
2answers
115 views

crontab's invalid time checking is inconsistent

One of our DBAs created the following crontab entry to run a backup every 3 hours starting 6:30 AM to midnight every day: 30 6-24/3 * * * (path to backup script) Cron took the entry but did not run ...
0
votes
0answers
62 views

pppd call to restart VPN ineffectual from a CRON

This works when I run it directly but never from a cron it is the 'pppd call OM01' which seems to be ineffectual when run from a cron. #!/bin/bash # vpnTest.sh test if you ping via the VPN # if ping ...
0
votes
2answers
346 views

What mailer does cron use to send mail?

I am trying to debug an issue with cron not sending mail on a Centos 6 box that I did not configure. How can I determine which mailer cron is using to send mail? The crontab man page has this to say, ...