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

learn more… | top users | synonyms (1)

0
votes
1answer
17 views

Edited /etc/cron.d/anacron, changes are immediately in effect?

After editing /etc/cron.d/anacron and saving the file, are the changes immediately acknowledged by cron? Or do I need to run a command to tell cron to reload /etc/cron.d/anacron?
0
votes
1answer
14 views

Scope of shopt options in cron script

I have a bash script that is run nightly in a cron job. It needs to do case insensitive file matching, so the script calls shopt -s nocaseglob I want to make sure this does not affect other cron ...
1
vote
0answers
41 views

Cron can't access my home directory when I'm logged out

I have quite a strange problem using cron. I distilled it thus far: I created following simple bash script in /home/user1/cron_dir/cron.sh: #!/bin/bash echo "Success" As user1 I created following ...
1
vote
0answers
6 views

start xscreensaver from cron@reboot, ubuntu startup, service/deamon?

I need start xscreensaver for ubuntu, and it can be started in ubuntu startup application. my question is: can xscreensaver be started in cron@reboot? can xscreensaver be started in service/deamon? ...
1
vote
1answer
25 views

run btrfs balance with cron

Since I run today in a problem with a full disk, which turns out is not unbalanced. Which you can fix with btrfs balance. So my question is: Is there any risk by ruining this by a cron job? (in ...
0
votes
1answer
32 views

Can someone be so kind as to setup a cronjob for me? [closed]

I've been trying to get cron to execute these two scripts to schedule and post on twitter, tumblr, facebook and linkedin. It worked once and never again. <?php require ...
3
votes
0answers
24 views

high precision subsecond cronjob replacement

I am looking for a cron replacement which could run subsecond schedule, is there have any "still alive" project which serve this purpose? Currently running Ubuntu 14
0
votes
1answer
34 views

crontab not executing my script?

I added this rule to the bottom of my crontab * * * * * /root/test.sh It basically resets iptables so I can fool around. If I mess up I won't be locked out of my box. When I run the script in bash ...
2
votes
2answers
34 views

Emulating /etc/cron.d/ on OSX

On most modern unixes, cron supports individual crontab files in /etc/cron.d, in which each task executes as a specified user. These files automatically update the crontab once edited. They allow ...
2
votes
1answer
52 views

Send backup by email with crontab

I use this cron job to do a backup of /home/blah/ each day at 01:00 a.m. : 0 1 * * * tar -zcf /home/blah/backup.tgz /home/blah/ In fact I would prefer that an email is sent to me with the .tgz file ...
1
vote
1answer
29 views

Are there disadvantages/consequences to adding scheduled tasks directly to /etc/crontab instead of using the crontab command? [duplicate]

CentOS 5.x I noticed that someone (presumably another admin) added an entry directly to the bottom of /etc/crontab so it reads like: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root ...
4
votes
1answer
37 views

cronjob does not execute when not logged in

SOLVED, see 'useless' answer. I have a cronjob in my crontab. When I specify the job to be executed in 2minutes, I wait, and then I can see files created by the job, I can see the process with ps. ...
1
vote
1answer
48 views

How to restart my server automatically using crontab if they went down?

I have a jar file which I am running like this in my Ubuntu 10.10 and then it starts my exhibitor server in the background - nohup java \ -jar ...
1
vote
1answer
36 views

Cron job — If computer inactive for x minutes turn wifi off

I would like to have an alias command in my .bashrc that could be ran at startup. That states: If computer is inactive for X minutes then turn off wifi. How would I do that? I am currently using ...
1
vote
1answer
31 views

Cron Job Not working [closed]

I have been trying to create a cron job to execute a script located in ~/Documents/script.sh at midnight every night and every 8 hours after that. I have found a lot of material on this but for some ...
0
votes
2answers
38 views

Crontab does not work properly in Ubuntu

I am learning how to use cron. I wrote some simple code in my crontab # m h dom mon dow command */1 * * * * echo "1 minute"> ~/Document/cronoutput I expected it to print the words every ...
1
vote
1answer
58 views

How to execute recurring Bash script at specific times?

How would I set a script to execute on every Tuesday and Thursday at 11:50am? I've been looking at the at command, but I can't conceive how to use it the way I need to from its man page.
3
votes
1answer
40 views

fault-tolerant crond replacement

I'm looking for a replacement to crond, or possibly an extension of it. The feature that I definitely would want to have is fault-tolerance. E.g. if a job failed to run due to the computer not being ...
1
vote
1answer
42 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
44 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
480 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
42 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
28 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
71 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
44 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
1answer
182 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
52 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
35 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
29 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
145 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
63 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
46 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
102 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
25 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
2answers
59 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
90 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
1k 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
44 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
58 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
1
vote
1answer
37 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
41 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
62 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
25 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
123 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
225 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
62 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
39 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
179 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 ...