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

Include executed cron command when outputting to log

Is there a way I can include the command that was executed in the output when I'm logging to a file? For example: * * * * * date && /path/to/php /path/to/script.php >> cron.log ...
1
vote
0answers
29 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 ...
14
votes
9answers
35k views

Running a cron job manually and immediately

(I have already read How can I test a new cron script ?.) I have a specific problem (cron job doesn't appear to run, or run properly), but the issue is general: I'd like to debug scripts that are ...
1
vote
2answers
607 views

How to configure apticron to just report security / critical updates?

We're going to try out apticron, but we don't want to know about every package that could be updated -- only the security / critical updates. How do we configure apticron to do this? PS -- yes, we ...
1
vote
1answer
996 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
2answers
21 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
2answers
890 views

APT FATAL -> Failed to fork

I saw a lot of questions regarding this, but mine seems a little different. Here's what I receive: /etc/cron.weekly/apt-xapian-index: FATAL -> Failed to fork. run-parts: ...
0
votes
0answers
21 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 ...
11
votes
4answers
7k views

Is there a way to validate /etc/crontab’s format?

I prefer to stick scheduled tasks in /etc/crontab so I can see at a glance what's scheduled to run, regardless of which user the task runs as. The only gotcha is that the format isn't validated on ...
2
votes
2answers
889 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 ...
0
votes
2answers
70 views

Cronjob in cPanel

I'd like to schedule a cronjob on my server to backup the entire public_html directory daily. I am logged into cPanel and I am on the Cron Job page where I have it set to run this command everyday at ...
0
votes
0answers
6 views

In crontab, @reboot is working but regular not working [migrated]

I am studying linux on my raspberry pi that installed debian version. There were no problem, worked perfectly in crontab, but something has occured in my crontab. @reboot sudo bash ...
1
vote
1answer
44 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 ...
0
votes
0answers
16 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 ...
3
votes
1answer
114 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
2answers
55 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
90 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 ...
14
votes
7answers
15k views

How to change “From:” field for emails from Cron?

I use remote SMTP via nullmailer and it requires set From field to the specific name, but cron set it as root@my.sweet.server.com. How could I change it to something like me@ya.ru?
-1
votes
1answer
30 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
145 views

ssmtp won't send cron email

I can't figure out why cron on my AWS EC2 (Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)) can't seem to send email out via sSmtp to AWS SES. This works: echo "test" | ssmtp my@myemail.com ...
0
votes
1answer
869 views

ubuntu crontab -e “/usr/bin/sensible-editor” killed; signal 9 (no core dumped)

Welcome to Ubuntu 11.04 (GNU/Linux 2.6.32-042stab037.1 x86_64) user@server:~$ crontab -e no crontab for user - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/ed ...
0
votes
1answer
20 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
18 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
39 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 ...
-1
votes
0answers
14 views

Crontab Syntax: Multiple ranges/Single Entry, Exclusions [CentOS] [duplicate]

I do development, and schedule tasks via cron for a certain client. I wish to exclude the 19th hour (7PM). I have researched it, and it seems that there is no exclusion syntax. Also there is no ...
1
vote
2answers
116 views

Cron job sends out the same data every time despite changes in the database

This question is related to Gentoo Linux. I have cron job that runs every morning at 10AM. The cron job calls a bash script which in turn calls a groovy script that queries the database for a column ...
0
votes
1answer
35 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
23 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
2answers
22 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 ...
4
votes
2answers
490 views

crontab listing or editing results in fopen: permission denied

Recently, a job configured to run from a user's crontab stopped executing. When attempting to list or edit the crontab for the user, the result is: user@host:~$ crontab -l crontabs/user/: fopen: ...
1
vote
1answer
42 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 ...
0
votes
1answer
46 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
2answers
2k views

How do I find and delete a cron job?

I created a cron job for a wordpress plugin that i no longer want running. I am not very good at navigating around in unix. The cron job was the following: */10 * * * * /usr/bin/wget -O /dev/null ...
0
votes
1answer
96 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
0answers
26 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"), ...
4
votes
1answer
124 views

cron job timing

I would like to start cron job at 9:30 and then work every 5 minutes and then stop at 16:30 everday. Is this kind of scheduling possible in one or do I need two cron jobs?
21
votes
5answers
9k views

Job scheduling using crontab, what will happen when computer is shutdown during that time?

I schedule some tasks using crontab. What will happen if my computer is shutdown or turned off during the time when cron was scheduled to do something? Does each missed cron job run after computer ...
5
votes
1answer
163 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 ...
2
votes
3answers
2k views

cron running at different timezone and date command shows different time zone

I have CentOS and when I run date command in shell it return me something like: Thu Apr 28 14:08:20 GMT 2011 however cron jobs are running at PST time.Means if I specify 15 7 * * * command ...
1
vote
2answers
75 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
34 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 . ...
-1
votes
1answer
43 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
28 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 ...
1
vote
4answers
1k views

Crontab + Rsync - nothing happens :(

Hello the interesting line in my crontab looks like this: (edited & saved it by running crontab -e) 23 * * * * rsync -av --delete root@example.de:/var/www/ /home/niklas >> ...
0
votes
3answers
1k 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 ...
0
votes
3answers
652 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 ...
0
votes
1answer
54 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 ...
1
vote
6answers
919 views

How can I run a script from cron only once at a time?

I would like to run a cron job. Scheduling it is easy and works. My problem is that I don't know how to only have one version of itself running at a time. Any ideas? G-Man
0
votes
1answer
73 views

Cron bash script skips second do/done set

I have a script that checks IPs for ping reply then tries to run an snmpwalk on them. I am trying to schedule the script to run weekly in cron. When I run the script in the shell, it runs perfectly. ...
-3
votes
1answer
183 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 ...