Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

0
votes
1answer
10 views

CentOS machine keeps “losing” active directory membership

All of our CentOS 6 machines have been joined to our active directory domain. Each of these machines eventually "loses" their domain membership, which breaks authentication for AD users. I created a ...
0
votes
1answer
23 views

Crontab permission problem

I have a fc19 host at work. This morning crontab did not work. $ ls -l /usr/bin/crontab ----------. 1 root root 53472 Jun 11 2013 /usr/bin/crontab The permissions -------- means no one has access ...
6
votes
6answers
294 views

What does '>/dev/null 2>&1' mean in this article of crontab basics? [duplicate]

I am reading an article about crontab There is something about disabling automatically sending emails. Disable Email By default cron jobs sends an email to the user account executing the ...
0
votes
0answers
15 views

Shell script to monitor log files going over a certain size [duplicate]

Due to another issue I'm tracking down, one of my app servers occasionally starts generating a large amount of errors and then becomes unresponsive. For now, the simple solution is to restart the ...
0
votes
1answer
37 views

What does */13 do in a crontab?

*/n * * * * in a crontab means run every n minutes, if n divides 60 evenly. What happens for other cases, like */13 * * * *?
2
votes
0answers
18 views

Configure job to expire

I'm learning Linux at the moment and were doing some exercises scheduling jobs with cron and crontab, but I'm wondering if it's possible to limit the amount of times that the scheduled job is ran. ...
0
votes
2answers
57 views

Why does this Shell script fail as cron job [closed]

I have the following in a shell script, when I run this script it works but when I put this as a cron job it does not work(nothing happens!). How come? script #!/bin/bash ...
0
votes
1answer
35 views

Please help me to debug this notify-send battery alert script

I used crontab -e to define the following: */5 * * * * env DISPLAY=:0 /home/max/.bin/battery-check.sh The contents of the script are: #!/bin/bash ...
0
votes
0answers
43 views

cronjob executes every minute but should execute every hour [closed]

I have a script which should be executed every hour, which creates a new log file. But it executes every minute. I am really despairing. My entry in crontab -e looks like this: #Create new logfile 0 ...
0
votes
1answer
45 views

Null message body; hope that's ok

I have the following command below as part of a cronjob. When I run the command via cron or at the command line, I get Null message body; hope that's ok. The contents of the email are empty but when ...
1
vote
0answers
43 views

How to do version-control repository update in crontab?

I'm trying to automate version-control repository update in crontab. The following script /home/usr/mrbean/bin/update.sh works in interactive Bash command-line: #!/bin/bash ...
0
votes
0answers
16 views

Configure cron for daily NMon task

I want to configure a cron job for NMon to gather stats during all day, everyday. Leaving a file per day to dump into NMon Analyser. I know the proper command to get a spreadsheet format its ...
0
votes
1answer
24 views

CRON path problems

I have a Python script that runs from the command line beautifully, but when I try and run it from CRON does strange things. The script generates, then runs an apk script file. The apk script file ...
0
votes
1answer
44 views

Cron Log File Outputs Nothing

I get no output from my cronjob. The script the job is executing is: <?php require '/opt/bitnami/apps/wordpress/htdocs/wp-load.php'; ...
1
vote
0answers
41 views

Cron job scheduled to run on specific day-of-week is running on last day of month as well

I have a cron job scheduled to run every Thursday at 6am via the following schedule: 0 6 * * 4 It's been running as expected, but on Tues, September 30th it ran (unexpectedly) and again on ...
1
vote
3answers
42 views

Where is this cronjob running?

We have a news server running on a CentOS 6.5 box. It's leafnode, and a cron is set to run every two minutes. We decide to shut it down to troubleshoot other issues, so we comment out the line in ...
2
votes
1answer
74 views

To write this Pseudocode with Regex

I am doing a Makefile which I run regularly by Crontab every day at 0230 crontab -e; 30 2 * * * /bin/thePseudocode Python-like Pseudocode directories = ["Cardiology", "Rheumatology", "Surgery"] ...
0
votes
1answer
22 views

Cron, crontab -e reads the wrong file

I do a simple: crontab -e In the top of this file, I have: #DO NOT EDIT THIS FILE - edit the master and reinstall. And I see that it has opened up some temporary file under /tmp I am using ...
2
votes
1answer
52 views

Cron job not behaving as expected

So I have a python script that pulls down git/svn/p4 repositories and does some writing to a database. I'm simply trying to automate the running of this script and based from what I see in syslog it ...
1
vote
2answers
59 views

cron will find certain commands on the PATH but not others

Having issues making crontab run certain commands, despite the PATH and SHELL being set correctly. Here is the env of the machine: SHELL=/bin/bash USER=ubuntu MAIL=/var/mail/ubuntu ...
2
votes
3answers
512 views

Cron job to check if PHP script is running, if not then run

I am wondering if someone might point me in the right direction. I've got little experience working with the Linux command line and recently due to various factors in work I've been required to gain ...
1
vote
1answer
26 views

Need to automate the updating of the crontab file

We have an automated process where a server is built, and after applications/middleware are installed using another automated process, and the crontab needs to be updated for those ...
1
vote
2answers
36 views

Do spaces matter in a crontab

It's not clear to be from the manpage for crontab. IS extra white space allowed between the fields? e.g., if I have this: 1 7 * * * /scripts/foo 5 17 * * 6 /script/bar 31 6 * * 0 /scripts/bofh is ...
1
vote
0answers
40 views

Maintain screen session when executing shell script on boot

On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot /root/start_server.sh And here's start_server.sh: screen -dmS server bash -c "cd server ; ./run.sh" When the system starts ...
1
vote
1answer
33 views

High precision scheduler daemon

I'm looking for a scheduler daemon like cron, but with at least seconds precision so I can use it for a radio automation app. I've heard conflicting rumors about cron's ability to handle seconds. If ...
1
vote
1answer
36 views

Why can I not source a file with the default cron installed on a debian wheezy server? [closed]

I use cron for years now. In order to load all my environment variables at once, I define them in a dedicated file (often but not always .bashrc) that I source in the crontab: * * * * * (. ...
0
votes
1answer
52 views

How do I do “Hello World” to try using cron

I am using Fedora 20, and want, eventually, to set up automatic backups. I managed a trial run on my previous Fedora 12 installation, but can't get started again. I am using zshell. I thought I would ...
0
votes
1answer
23 views

Why is there an apt-get script set in my cron.daily, I'm on Fedora 20?

I found this file tonight: /etc/cron.daily/apt.cron #!/bin/sh [ ! -f /var/lock/subsys/apt ] && exit 0 [ -f /etc/sysconfig/apt ] && . /etc/sysconfig/apt [ $CHECK_ONLY == "yes" ] ...
2
votes
2answers
89 views

How to make my bash script be able to create an log file for a clamscan running in cron?

I've created an custom clamscan(clamav) in bash and when I run it in my shell everyhing is fine, but if I run it in a cron, it can't create the log file. This are the errors: ...
0
votes
1answer
110 views

CRON job to check if PHP script is running

I am having trouble regarding CRON jobs, I've basically got two php scripts that I want to keep running continuously on my server. Currently I am using an infinte loop to keep them going but they seem ...
0
votes
1answer
41 views

openSuse, not running the cron job

I have created a cron job in the /etc/cron.d/dispatchingEmail_I the permissions of dispatchingEmail_I are the following: -rw-r--r-- 1 root root 84 Sep 11 19:52 dispatchingEmail_I content of ...
0
votes
1answer
29 views

Unable to install crontab on OpenSuse

I am running the following command as root, on OpenSuse: linux-gn77-PC:/home/harbir/project # crontab -e when the editor opens up I type the following, as I want the command to be run at 2145 hours ...
1
vote
3answers
90 views

Using nohup to keep a script running indefinitely

I am very new to Linux and I've only been using it to SSH to my web server using Putty. The issue I am having is this: Basically I've got 2 php scripts. One get_tweets.php constantly listens for ...
2
votes
1answer
21 views

Incorrect cron for midnight?

I checked the crontab set by the hosting company and they have this: 0 * * * * /usr/bin/php /www/sites/[domain.com]/files/html/shell/indexer.php reindexall Does this cron run constantly or once at ...
1
vote
1answer
30 views

Execute All Cronjobs in ~/.zshenv Environment

I want to execute all cronjobs in the environment defined in my ~/.zshenv, and I want to redirect STDOUT and STDERR of every cronjob to a single log file. I am on OS X 10.9. What is the cleanest way ...
2
votes
1answer
33 views

Qt program not invoked by cron

I had a simple Qt program, when running, it shows a simple window with a countdown timer. If you might be interested in the code, please see here. I had crontab line * * * * * ...
0
votes
1answer
34 views

How to create CronJob for running commands on reboot?

Via my host I have SSH access and a control panel. I installed Rails via SSH on a light weight server. I want to reboot the server when it goes down. I think I need to start it manually since I want ...
2
votes
1answer
18 views

Send cron mails to root bundled every hour

Sometimes when there's a problem on my server, I get hundreds of emails in my root account which are caused by cron. I want to be notified about those problems but isn't there a way to bundle those ...
1
vote
1answer
64 views

How can I periodically check if my network is up and reconnect if not?

I've written a script to periodically check whether my network is up by pinging three major sites and disconnecting and then reconnecting my network if all three fail. This script works fine from the ...
0
votes
1answer
66 views

Run screen command with variable & tick through cron (cron run .sh)

I run screen command through cron, where the codes is in lorem.sh files. This is cron codes: * * * * * cd /home/z; ./lorem.sh Inside lorem.sh: screen -S screenname -X stuff $'\033[B' sleep 1 ...
0
votes
1answer
66 views

crontab entry for a command to run every week and three months?

What would be my crontab entry for a command which I want to run every week. I don't want to run any command between 8 PM till 5 AM and any random day is fine. Similarly what would be my crontab ...
1
vote
2answers
102 views

Can I configure error notifications on a specific cronjob entry to go to a different email address?

I have multiple cron job entries configured under a single account: 0 0 * * * /foo/foo.sh 0 2 * * * /foo/foo2.sh 0 4 * * * /foo/foo3.sh Right now, if any of these encounter an error, an email is ...
0
votes
0answers
24 views

How to prevent cron emailing on termination

Whenever one of my cron scripts finishes, I get an email saying /bin/bash: line 1: 19653 Terminated <command>. How do I prevent this email being sent? I suspect it might only happen when the ...
2
votes
1answer
79 views

How can I pass a filename containing percent signs (%) as a parameter to a shell script in cron? [duplicate]

We have currently setup a cron job for our new script as below: 46 22 * * * /gzm_common/diagbat9/global/prod/chgstatus.sh /backups/diagbat9/Demantra/output/SK_ITEM_EXTRACT_MFGPRO_$(date +%m%d%y).txt ...
0
votes
2answers
44 views

confuse about User:Group what is the best for /var/www, and Crontab user?

I'm new on linux server. I have 2 question that I'm confuse about this. 1 1. user:group now I chown my /var/www/html like this. my nginx.conf is set server{ user www-data } and in terminal I set ...
0
votes
2answers
79 views

How to set cron job for system

I'm really new on Linux and have no any previous experience on it. And I opened this account to ask this question. I need to install a cron job I've followed the short guide here. Well, I think it ...
1
vote
1answer
178 views

Reboot when no network connection does not work!

I have a Raspberry Pi that I use as a NAS for my local network. It works fine, but when I turn off the router to which the pi is connected, it permanently loses the connection. To be able to connect ...
1
vote
2answers
1k views

crontab error with (No MTA installed) but I use >/dev/null 2>&1

I'm new on linux user I try to run crontab to backup my database with vagrant user * * * * * /usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date ...
1
vote
0answers
76 views

systemctl to start cron-like job

In /etc/systemd/system directory I have: rsnapshot-backup.service file, with following content: [Unit] Description=rsnapshot backup automation [cron like] [Service] Nice=19 IOSchedulingClass=2 ...
0
votes
1answer
59 views

How to start a cron task?

It sounds really simple, but many times I was stuck at the beginning of learning a new command. The tutorial writer think it's natural to start, but it's not. This is the tutorial I've been reading: ...