cron is a task scheduler based on clock time that runs on Linux-based machines.

learn more… | top users | synonyms

1
vote
3answers
73 views

Prevent users from using the same cron schedule?

I've a lot of users in my server using exactly the same cron schedule and this is causing high server load. Can we prevent this? For example, if there's x numbers of users that use the following cron ...
1
vote
3answers
303 views

cannot access crontab with sudo after being added to /etc/sudoers list

My user "craig" is in the /etc/sudoers file on my CentOS 5.6 VM, however when I try to access the crontab using the command below I am presented with an error message: sudo crontab -e -u ...
2
votes
2answers
135 views

easy way to automatically retrieve image for desktop background?

I would like to automatically download and replace an image from the NASA website to use as my desktop. in linux i used a cron job to do this, using wget to retrieve the file and a small utility to ...
2
votes
2answers
531 views

What are the limitations of crontab?

Hardware considerations aside, are there any limitations on: The maximum number of cron jobs that can be scheduled for a single user The maximum number of CONCURRENT jobs that can be scheduled for a ...
1
vote
2answers
2k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
1
vote
2answers
124 views

Rsync to take the newest file. And a cron job?

I have a log file on two different servers. The servers are under a load balancer so half the traffic goes to one server, and half the traffic goes to the other server. I need to take the newest log ...
0
votes
2answers
46 views

crontab is not working

I am using Linux Fedora. I want to create a crontab with SCP command, but it's not working. [shiv@db2 ~]$ crontab -l #this is server to server copy... */2 * * * * date >> ~/$ scp ...
0
votes
2answers
66 views

How can I get a script to run constantly on Mac OS X?

I would like to do this: When the application VLC is open and I press the space bar, it pauses the video and an itunes starts to play. Then spacebar again would resume the workout video and pause my ...
0
votes
2answers
31 views

Using cron vs. system managed service for frequent tasks

If some task should run in an frequent but not neccessary precise manner, what would the benefits of using cron vs. just using a service (eg. managed by upstart) with a loop script like #!/bin/sh ...
0
votes
2answers
102 views

crontab email is not working as expected. First I got the emails at gmail, now I'm not getting them

First I ran a simple test to see if I could get crontab to send me an email. I created the following line: MAILTO = my_email_address@example.com 1 * * * * /bin/echo "foobar" This worked as expected ...
0
votes
2answers
964 views

RHEL6 Crontab doesn't work properly?

In RHEL6 root's account I have crontab job: 30 6 18 4 1 /sbin/init 6 It worked fine on the 18th of April and properly restarted my system, BUT it also restarted my OS at 6:30 on next Monday - ...
-1
votes
2answers
28 views

What is the risk when editing crontab file without the “crontab -e” command?

I developed a script in which I add lines to the crontab file with echo command and I remove lines with sed command. I do not know the risk of that especially that I find in some web site that we ...
-1
votes
2answers
416 views

cron uid:gui for every username

So in the nutshell : There was user John with 502:502. After i deleted John and recreated him, his UID:GID changed to 504:504. Cronjobs are still running under the John's crontab, but when the ...
1
vote
1answer
756 views

How can I set a system wide PATH-variable for cron on Centos 6.4

I'd like to make sure that every user specific crontab has the same PATH-environment. I tried to set the PATH in /etc/crontab but it seems like this config file is not read by crond. Following are ...
1
vote
1answer
2k views

Running Cronjobs as per Local Time rather than Universal Time

On running dpkg-reconfigure tzdata in terminal and i get 2 different time on my machine Local time is now: Wed May 1 11:58:55 IST 2013. Universal Time is now: Wed May 1 06:28:55 UTC 2013. ...
1
vote
1answer
330 views

How to edit multiple cpanel user cron jobs at once?

I'm using cat /var/spool/cron/* to view all cron jobs created by all cpanel users. Is it possible to edit its output just like editing via nano and hit save?
1
vote
1answer
235 views

What might cause cron jobs to occasionally not run or complete?

In my crontab, I have set MAILTO and a bunch of cron jobs (5-10 jobs). These cron jobs usually run fine and I get emails for them. Most of these jobs consistently run as expected. Emails and ...
1
vote
1answer
487 views

Need to set cron for random intervals with iMacros

I am trying to learn about cron for iMacros but I don't know where to look. Google was no help. Basically I have script I wrote, a series of commands, like this: Line 1 Line 2 Line 3 etc. What I ...
1
vote
1answer
289 views

Cron not executing jobs

I'm having trouble making cron work. I edit my cron jobs doing sudo crontab -u myuser -e sudo crontab -u myuser -l prompts my cron tables: ##### */1 * * * * /home/myuser/Projects/scripts/cron.sh ...
1
vote
1answer
211 views

How can I automate or script daily downloads for any new anti- virus databases, and then have the program scan my drive?

(I know there are much better softwares out there for the Mac so please don't go there! The politics of this company dictate which Anti virus we have to use) Anyway without any further wait: ...
1
vote
1answer
295 views

Running git-svn with cron results in garbage in .git

I've setup a git-svn repo with cron to fetch from the svn repo daily. I have a script to do the fetching, and this is what is invoked by cron. Everything is fine with the repo, and the script works ...
0
votes
1answer
59 views

DD-WRT Additional Cron Jobs aren't running

I have installed DD-WRT (v24-sp2 (06/23/14) std - build 24461) on a TP-Link TL-WR841ND v9 and I'm trying to add a CRON job to update my Unlocator IP configuration as described here: How to set up a ...
0
votes
1answer
70 views

Ubuntu Cron ec2-create-snapshot

I have a new ec2 Ubuntu instance running. I have properly set up the ec2-api tools. I want to create a daily backup using the ec2-create-snapshot command. Just to test it, I have my script, which is ...
0
votes
1answer
59 views

WGET/cron downloading webcamera file

our new town doctor put a web camera to his waiting room for people to see how much crowded it is. As my mom and grandparents go to this doctor, I wanted to download the files periodically and if they ...
0
votes
1answer
41 views

Check shell Script copy Status

I have a cron script and i need to adjust it; Actually some clients are generating in a directory some files, my task is to backup that files to a tape, and i need to make a if then else cp $files ...
0
votes
1answer
141 views

Editing IPTABLES nat rule in cron job

I am sitting here with an issue: I need to switch the source interface for iptables' NAT rule at a given time. I want to basically do soemthing like this - caution: concept code: #!/bin/bash if [ it ...
0
votes
1answer
106 views

Who starts updatedb process and why it uses 700+% CPU?

I have a VPS running CentOS, and recently its CPU usage goes over 700% for two times already. It always turns out to be a process named "updatedb" (as show in the figure below). After a quick ...
0
votes
1answer
35 views

I've made a php page as a cron job, how should I format the page?

So, a while back I was looking at how to make them, got it just about figured out, and then found out with 000webhost you can only link to files in your website, and couldn't write a command line ...
0
votes
1answer
160 views

Cron unable to run shell script

I have been trying to get a shell script to run for hours using cron to no avail. I am trying to have the following bash script run every minute #!/bin/bash ...
0
votes
1answer
194 views

Rsyslog hangs processes

I have a quite odd problem. At random times my dovecot daemon dies and I cannot receive/send emails while the host is still up. When trying to SSH into the server to see what happened, I discover that ...
0
votes
1answer
52 views

How do I monitor resource usage of crond php scripts?

I am using a VPS which is running 5 php scripts on a minute by minute basis using cron. Each script, itself, loops to execute a mysql query then sleeps for between 5 and 15 seconds. They all ...
0
votes
1answer
193 views

crontab a bash script that is copying certain files

First I would like to say that I am terrible with scripting so this has been a true challenge for me. Any input would be great! I would like to automate an sftp transfer every 24h. If I am lucky in ...
0
votes
1answer
42 views

Crontab stopped unexpectedly

I have following entries in the crontab: 0 0 * * * /mnt/voylla-production/releases/20131111011431/script/rubber cron --task util:rotate_logs ...
0
votes
1answer
225 views

How to configure in crontab with condition statement for checks

We like to monitor the NAS storage mounted on a Linux box. We only like to be notified via mail when the usage exceeds a certain number, say 80. We have only seen in Linux books where most of them ...
0
votes
1answer
111 views

Automated git push attempt does not work - authentication issue

I'm trying to automate a very periodic git add/commit/push cycle using a shell script and cron under OS X 10.8.5. The script is as basic as one would expect it to be: cd /my/directory git add . git ...
0
votes
1answer
146 views

Ubuntu — Application global environment variables

So I have an application I am deploying to an Ubuntu 12 server. My application has several "parts" to it: There's a web server, run as part of an upstart script There are cron jobs There are ...
0
votes
1answer
842 views

Can I use cron or launchd to run a bash script without being logged in?

I'd like to have a simple bash script run (regardless of whether anyone is logged in or not) akin to putting it in /etc/cron.daily/ on Linux, but on Mac OS X Mountain Lion 10.8.4. If it's possible, ...
0
votes
1answer
62 views

Run command in cron

I'm trying to execute the command "redshift -l 33.8683:151.2086" at boot on my ubuntu system. The program works when run in a terminal so it may be sensitive to having the right runtime level. I've ...
0
votes
1answer
809 views

How to resolve Win32 error 1069 when starting cron under cygwin?

The machine runs Windows 7 Home edition. I'm trying to use rsync to backup files to a linux box. The rsync command runs fine in cygwin. I resolved an earlier error by running the cygwin terminal as ...
0
votes
1answer
144 views

Cron Job Command To Delete 0 Byte Files

I need to have a Cron Job, that when it runs automatically deletes all of the files inside of a folder that are exactly 0 bytes. The script I am using allows users to enter their username so it ...
0
votes
1answer
371 views

What time does cron.monthly jobs run in SLES?

doc says cron.monthly will be scheduled according to the first run time and it compares /var/spool/cron/lastrun/cron.monthly with current time to run. Question is will it run according to the ...
0
votes
1answer
128 views

Cronjob using the mail function

When I run this mail command from the terminal, there's no problems: mail -s "Test Mail" user@example.com < home/user/example.txt When I add it to a bash script that mainly does this, there's no ...
0
votes
1answer
244 views

Make crontab work at 0 hour

I try to execute some command like this: */10 0,1 * * * $BPY some_script.py Meaning I want to run it every 10 minutes between 0:00 and 1:00. BUT: I see in my /var/log/cron that it is not executed. ...
0
votes
1answer
329 views

Crontab No such file directory

I'm trying to run an hourly python script. My crontab looks like this: crontab -l 0 * * * * "/common/.../www/concat.py /common/.../www" as an output I get this: /bin/sh: /common/.../www/concat.py ...
0
votes
1answer
461 views

Is it possible to add directories under cron.d?

I wanted to partition a single cron file into separate logical units and place them in subdirectories. One folder under cron.d would have all crons associated with say, removing certain types of ...
0
votes
1answer
102 views

In OS X Lion under zsh, how can I set up a /Users/username/tmp directory which deletes after X days?

I'm new to scripting and regular jobs on OS X, so appreciate the help in advance. I'm looking to have a tmp directory in my homedir, as in /Users/username/tmp which I can use as my "downloads" ...
0
votes
1answer
505 views

Restart Solaris 10 SMF service automatically each day

I am currently facing the problem how to restart a SMF service automatically each day at a specific time. The simplest solution probably is to use cron. Currently my main objection is handling "lost ...
0
votes
1answer
153 views

Scheduling Cron Jobs Without Colliding Frequencies

If I have several cron jobs that run: Every minute Every 5 minutes Every 15 minutes Every hour At midnight Then at exactly 00:00 I have 5 jobs running at the same time. I want to add another job, ...
0
votes
1answer
203 views

bash, mirroring of multiple directories (hard linking)

I have 5 FTP users that upload files (and subdirectories) in their home directory, i need to mirror theese directories beetween them and with a "master" directory (accessible from a 6th user). Files ...