cron is a task schedueler based on clock time that runs on Linux based machines.
1
vote
1answer
55 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
97 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
1k 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
341 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
176 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
712 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
1k 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
0answers
24 views
configure mail program for cron
I want to change the mail-sending program that is used by cron.
My cron jobs are executed, and I have a mail script that sends mail directly to SMTP. It seems, there is no MTA installed on the ...
0
votes
2answers
206 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
244 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
187 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
210 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
304 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
192 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 ...
0
votes
0answers
246 views
Trying to run a cron job in cygwin but unable to since the cron seems to ORPHAN. How do I solve this?
the output of
$ cronevents
2012/07/13 17:05:12 [Administrator] crontab: PID 2468: (Administrator) END EDIT (Administrator)
2012/07/13 17:05:19 [Administrator] crontab: PID 656: (Administrator) ...
1
vote
1answer
115 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
6k 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
89 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 ...
0
votes
0answers
238 views
(date) script for freenas
My webserver is running freenas 8.0.4.
Currently in /etc/crontab there is this task (daily)
find /mnt/vol1/1 -type f -mtime +16 -exec rm -R {} \;
This allow me to delete files older than 16 days..
...
2
votes
2answers
190 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
165 views
Backup Script - Could Not Open Input File
this is the backup script that I've got going:
http://pastebin.com/4g4E6wUz
This is the cron info:
/usr/local/bin/php /home/backups/backup-db.php --filename-dated ALL
No matter what I do, I keep ...
0
votes
0answers
30 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 ...
0
votes
1answer
295 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
781 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
3answers
101 views
Will this cron job run as expected? [closed]
I have a fairly important cron job set up and I would like to know if it will run 5 minutes past the hour every hour every 3rd day?
5 * */3 * * php ...
0
votes
1answer
78 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" ...
1
vote
1answer
637 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
...
4
votes
3answers
2k 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
3k 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
269 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
731 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.
0
votes
1answer
393 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
235 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
146 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
82 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
253 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.
...
4
votes
2answers
2k 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
228 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
3
votes
1answer
107 views
Cron job once a minute for one hour a day
Is there a way to run a cron job once a minute for an hour every day?
I know I can probably make 60 cron jobs to do this but that would make it difficult if I ever needed to edit the job.
1
vote
0answers
475 views
Why does cron task run twice?
I have a task that should run each day in Ubuntu10.04. So I use crontab and copy the scripts of the task to the directory /etc/cron.daily.
Here is the my crontab:
# /etc/crontab: system-wide crontab
...
1
vote
0answers
148 views
What happens if cron.daily is not terminating
Today I had to realize that some cron jobs werent run on my server! In the log files I find this:
Mar 13 03:30:01 osp-server anacron[7261]: Anacron 2.3 started on 2012-03-13
Mar 13 03:30:01 ...
1
vote
3answers
324 views
What do slashes “/” mean in crontab?
I'm seeing slashes in some crontab examples, I don't understand what they mean?
Check this one out for example
*/10 * * * * /home/ramesh/check-disk-space
...
4
votes
1answer
3k views
what is run-parts in /etc/crontab, and how do I use it.
I have been digging through my Linux system. To try and understand how it all works
In the /etc/crontab file. I see the following
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * ...
1
vote
1answer
253 views
How is crond daemon started without an init.d/chkconfig entry?
I'm running a sandbox server with Fedora 15. I've gathered that since my crontab file has no entries (ie. ***** run-parts /dir/) for scheduled run-parts, it is not currently configured. The ps command ...
2
votes
1answer
96 views
possible ways to totally wipeout cron jobs
I have accidentally wiped out all my cron jobs. I'm not sure what I have done. I don't remember deleting entries from it by issuing crontab -e. What are the possible ways that the cron jobs can be ...
0
votes
3answers
1k views
Simple Cron task in Mac OS X Lion
I am trying the Cron facility in Mac OS X Lion, but it does't seem to work.
The crontab looks like this:
MacBook-Air-de-Vincent:run vincentle$ crontab -l
MAILTO=bxxxxxxxx@gxxx.com
* * * * * (echo ...
1
vote
1answer
258 views
Debian Linux cron stubbornly refuses to run at right time
I have a Debian Linux server, recent install. It has this cron job:
7 1 * * * /do/something/important.sh
As I read that, it should run at 1:07am. Instead, it runs at 5:07pm.
So, wrong ...
1
vote
1answer
270 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 ...
3
votes
1answer
328 views
Shell script of mysqldump works fine when run manually, but does not run in the cron job?
I have a shell script to get a MySQL database dump. This script works fine when run manually
#!/bin/sh
fqn=/home/Mysqluser/daily_dumps/bookstore_`date +%Y%m%d_%H%M%S`.sql.gz
mysqldump -u root -h ...
1
vote
0answers
40 views
query a URL every H hours for changes in the results?
How can I query a specific URL (mostly html and js) every H hours for changes in html content, which is mostly an html table with some header, and have the results fed to an RSS? This URL in question ...