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

learn more… | top users | synonyms

0
votes
1answer
225 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
800 views

How can I save a cron job?

I have connected via ssh and have added a cron job but I can't figure out how to save it. I'm still on the crontab -e page how do I save my changes?
0
votes
0answers
31 views

This weird behaviour from cronjob

I have set the crontab like this: */5 0 * * * /www/permitChat.sh and the /www/permitChat.sh is this: # We are setting the name of file # in the variable along with complete path. sFilePath=`date ...
2
votes
1answer
766 views

Cron jobs are running but there is nothing in crontab? Have I been hacked?

I have a server that's been running for years now and there are no cron jobs set up. I have not logged in or changed anything in months. Suddenly I started receiving emails that look like this, about ...
0
votes
1answer
321 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 ...
3
votes
1answer
70 views

What does this crontab line do?

What does this crontab entry do? I'm thinking it means run the jobs.sh script every Monday at 11AM. Is this correct? 0 11 * * MON /home/username/jobs.sh
1
vote
1answer
859 views

cron job when Ubuntu is suspended

I am using Ubuntu precise. Is there a way to have scheduled cron jobs run even when Ubuntu is suspended? Perhaps some way to automatically wake up the system so a scheduled cron job can proceed and ...
1
vote
3answers
570 views

cron ignoring environment variables?

This should be simple, but it doesn't seem to be working. I have a very simple script run by cron: export MAILTO=foo@foo.com MAILTO=foo@foo.com echo "MAILTO is set to $MAILTO" Cron, however, seems ...
2
votes
3answers
664 views

Cron job outputs HTML; how to send mail as HTML

I have a cron job that if it fails outputs HTML. If it succeeds it outputs nothing, in which case I get no mail. If it does fail and write HTML, cron sends me the mail but it comes as plain text and ...
0
votes
1answer
89 views

Crontab as other user

I am running crontab as root user: screen -S konsola -X stuff 'say hello'`echo -ne '\015'` How do I run it as the user "nobody"? Only this user has screen with given pid, thats why I need it.
2
votes
1answer
2k views

Two parts: linux startup script to connect to bluetooth and cron to keep it connected

I have a mini bluetooth keyboard and a Raspberry Pi running a Debian-based distro. I know the MAC address of the keyboard but for this question, let's just use AA:BB:CC:DD:EE:FF. Right now I have to ...
0
votes
1answer
536 views

Ubuntu Precise cron.daily issue

I have a very strange problem. I've placed a script into /etc/cron.daily on my Ubuntu 12.04 server, gave it the appropriate permissions (0755), and assumed it would run correctly. I guess that was too ...
1
vote
1answer
338 views

“killed” message from cron.daily, but not when run from command line

On Fedora 17, I put a file into /etc/cron.daily with the following contents: cd / su dstahlke /home/dstahlke/bin/anacron-daily.sh exit 0 For some reason, I get a mail every day that just says ...
1
vote
1answer
407 views

Run Cron every 2 minutes in 30 minutes?

I need to run a cron job every 2 minutes (*/2) but only for the first 30 minutes of every hour, with pause of 30 minutes between the runs. For example, something like: From 10h00 to 10h30: run ...
1
vote
2answers
2k views

Error in Ubuntu, what does this mean?

Got this on my machine. I was just browsing the web on Chrome and my computer froze. I recently just built this machine. I have a feeling it is a hardware problem... Possibly one of my parts arrived ...
1
vote
2answers
513 views

Backups over SSH via Cron - which user?

I'd like to use rsync to regularly backup content from a production website to a backup server. The content being transferred from the remote system has a variety of permissions and owners assigned. ...
1
vote
1answer
611 views

Are there good reasons to have a single cron job run multiple comands [closed]

How would cron handle a job that executes multiple commands. As an example I have a cron job that looks like this. Which gets very difficult to read. 10 0 * * * firstscript.sh > first.log; ...
1
vote
1answer
148 views

crontable OR conditions

Crontable parameters seem to function as 'ands' conditions. So the example 0 9-5 * * 1-5 Runs when the conditions are met "minute is zero AND hour is between 9 and 5 AND day is between monday and ...
0
votes
0answers
141 views

Will my weekly cron job work?

I'm just getting back into bash scripting and I want my cron job to run every 15 minutes between 9.15 and 10 PM. I've checked the script works, but I don't know if it's the right command: ...
3
votes
2answers
3k views

ssh Permission denied only in cron job

Having a very strange problem. I've created a small bash script which runs a command on a remote host via ssh (using public key authentication). When I run this script manually from the command line ...
4
votes
2answers
594 views

Auto suspend after X minutes to stop myself procrastinating

Right now, I'm using a line in /etc/crontab to run pm-suspend every 30 minutes, but I would like an application displaying a warning before suspending (for example a countdown in the taskbar). An ...
0
votes
2answers
351 views

SShfs and security

I have following questions: If I mounting sshf mail@host:/home/mail ./foo Is it any way to restrict possibilities of mounting and to not give shell access? All I want is remote, secure storage for ...
2
votes
4answers
3k views

how do i run a script 5mn after startup?

I have severals RoR websites running on my webserver and I need to run a ruby script at startup. So, I puted a bash script in /etc/init.d witch call a ruby process. Unfortunatly that ruby process ...
1
vote
2answers
3k views

crontab - /bin/sh: wget: command not found

I want to set up a crontab on my Macbook Pro running Lion. I run the usual crontab -e and provide a quick job to see if everything is working ok --- */10 * * * * wget -O - -q -t 1 ...
0
votes
2answers
380 views

Windows app to grab webcam snapshots?

I want to periodically capture an image from a webcam attached to a Windows PC, and upload it to a Linux server on the network (preferably FTP, could be SFTP or even Samba). The images have to be ...
1
vote
0answers
380 views

“ssh_exchange_identification: Connection closed by remote host lost connection” when running cron job

I have a Ruby script that connects to a remote machine via ssh and executes a command. The script runs fine when I just run it in my terminal. In my crontab, I have 1 * * * * /bin/bash -l -c 'ruby ...
0
votes
1answer
332 views

Cron job for moving directories older than 24 hours

Well, what I want to do is The cron should run every hour or so It should move the directories in a folder /disk1/data/ older than 24 hours to /disk2/data/ The directories moved should contain all ...
0
votes
1answer
442 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 ...
1
vote
0answers
394 views

Inconsistencies with SCP for Ubuntu and Windows Server 2003 (using CygWin 1.7.x.x)

Some days ago I was able to scp to the remote server from my windows server 2003 using cygwin to copy the id_rsa, using scp (id_rsa.pub location) user@example.com now it(scp) seems to be not working. ...
1
vote
2answers
350 views

Why cron saves at /root, when should at /var/www?

Why my cron */1 * * * * /usr/bin/php /var/www/query/query.php &> /root/querylog.log saves query.php output in the /root/ folder? (this script shall save *.txt at its location) It should do so ...
1
vote
1answer
228 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 ...
3
votes
1answer
12k views

Why is my crontab not running

I have this cron 38 * * * * /bin/bash -l -c 'cd /var/rails/site/releases/20120705144335 && script/rails runner -e qa '\''Play.load_lists'\''' I have this cron under the a different user so ...
2
votes
2answers
133 views

Cron Job that restarts crashed game

So I'm hosting a game that is very tempermental and can crash a lot on Linux, I made this cronjob to restart the screen and game should it fail: #!/bin/bash for t in {1..12} do if [ -z "$(ps -C ...
2
votes
2answers
677 views

crontab -e fails to start

whenever I try to run crontab -e I'm getting errors such as: no crontab for banana - using an empty one /tmp/crontab.oeFm1e: Invalid argument Is there any way to edit / install the file?
0
votes
0answers
33 views

Run checkgmail as a cron job [duplicate]

Possible Duplicate: How do I make cron run a Java GUI application? I use checkgmail at work constantly, but this application has a memory leak, and after a week (I never shut down my work ...
2
votes
1answer
477 views

Schedule bash script for one time use on OSX

I'm trying to do a little script that, as a function, will take a file and date as input and delete that file on the specified date. So I only need it to schedule to run once, and that's it. I'm on ...
0
votes
1answer
2k views

How to delete directories older than one hour (cron job)

My application creates directories when user performs certain action. These directories are stored on my machine for exactly one hour and than are deleted. Now I would like to move the 'deleting ...
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" ...
4
votes
1answer
2k views

Is there a aliases file for sSMTP?

I installed sSMTP for sending emails from command line. I want to create some alias for cron jobs: $ sudo vim /etc/aliases # append this line at the end myname: root $ newaliases ...
6
votes
5answers
5k views

Run a cron job on the first Monday of every month?

I'd like to run a job from cron at 8.30 on the first Monday of every month. The cron Wikipedia page says While normally the job is executed when the time/date specification fields all match ...
3
votes
1answer
7k views

How to use @reboot for crontab with delay

In crontab, I can use @reboot to run a command after the system reboot. Is there a way to do this with an delay, i.e. run a command after 10 minutes of reboot?
-1
votes
2answers
404 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 ...
0
votes
2answers
2k views

How can I perform a cron job every minute?

Are the following cron configurations identical? * * * * * 0 * * * * 1 * * * * I'm looking for a configuration that will run the job every minute.
1
vote
1answer
772 views

How do I make cron run a Java GUI application?

I have a script which runs a Java GUI application using "java -jar app.jar". I have added the script to the crontab to run every minute, check the processlist if the application is up. If it isn't it ...
0
votes
1answer
480 views

“Permission denied” when trying to use RVM with Cron

I am trying to employ the method descibed here. My crontab: # m h dom mon dow command @reboot /home/qe2user/.rvm/environments/ruby-1.9.3-p125 /home/qe2user/Ruby/test/prog.rb > ...
0
votes
1answer
297 views

Running cronjob on specfic hours

How do i setup a cronjob to run every hour except from 11pm until 1am ? Because during that time, the system is doing maintenance. Cheers
0
votes
1answer
148 views

Cron view on VPS

How can I view all cron jobs scheduled on my Linux Ubuntu VPS? When I use crontab -l I do get a list of cronjobs but I cannot see the ones that are scheduled by WordPress, how can I also see the ones ...
2
votes
1answer
365 views

How to set-up date for cron weekly backup?

I'm writing a command for cron to do automatic backups for my flashdrive. I use tar ... -N <some date> to make the backup. The issue is how to write the command which gives me the right date. ...
11
votes
2answers
7k views

Set a cron every certain hours between certain hours

How can I set a cron to run every 2 hours between 8 am and 5 pm for example? Is this possible?
0
votes
1answer
328 views

Convert cronjob to launchctl plist

I should convert this cronjob to a launchctl plist. Is this possible? 0 8-18 * * 1-5 /usr/bin/curl -s --data "par1=a&par2=b&press=OK" http://mydomain.com/file.php /dev/null