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

learn more… | top users | synonyms (1)

0
votes
1answer
34 views

help with remote file find/scp

I have a set of files on a remote sftp which I need to download to a server every day. sftp uses ssh keys to authenticate, so I created a ssh key and added to the remote server authorized folder. I'm ...
0
votes
1answer
47 views

Cron Job every 55 minutes [duplicate]

I want cron to be run in every 55 mins. I followed the link CronJob every 25 minutes and my crontab command is */5 * * * * [ $(( $(date +%s) / 60 % 55 )) -eq 0 ] && wget ...
1
vote
1answer
24 views

Issue Using Crontab to Create/Restart Screen and Run Command

I want to have a certain script (rails rake task) running on my server at all times - it basically populates my DB using a live feed. I can create a screen (http://linux.die.net/man/1/screen) and run ...
1
vote
4answers
73 views

How to stop minute cron job?

I have a program written in python; my program scrapes a value from some financial website every minute and pushes that value into my DB. My program takes like 1 or maximum 1.5 seconds to do this ...
0
votes
3answers
54 views

Cron job to run every minute from 11PM to 6AM

I have a python program which I need to run every minute from 11PM (EDT) to 06AM (EDT). How can I schedule a cron job to do this? * 23-6 * * 1-5 python my_program.py will this work? or do I have to ...
6
votes
1answer
40 views

How can I make `sudo crontab -e` use my `sudoedit` environment?

I've started using sudoedit <file> instead of sudo vim <file>. One of the advantages is that it uses my local ~/.vimrc. However, when using sudo crontab -e, it uses /root/.vimrc instead. ...
-1
votes
1answer
45 views

how to prevent cron job email splitting into multiple lines

CRON has emailed me the extract below : May 12 04:27:54 rpi postfix/smtpd[9343]: NOQUEUE: reject: RCPT from unknown[95.211.213.214]: 504 5.5.2 <WIN-HBAL58UG0JH>: Helo command rejected: need ...
1
vote
0answers
7 views

Skip syslog/rsyslog logging of certain cron jobs

In most GNU/Linux distributions the default is to log start (and many different events) of every cron job to syslog. It's rather convenient, but not for a very frequent jobs, which started, say, every ...
0
votes
2answers
62 views

Cron job which runs every 5 seconds

I need to create an cron job with the following functionality: The job should go to a particular directory and touch one file every 5 seconds. It should run for only 1 minute. The logic is to ...
1
vote
1answer
13 views

Does systemd timer unit skip the next run if the process hasn't finished yet?

I want to use systemd to run a command every 5 minutes. However, there is a risk that occasionally the task may take longer than 5 minutes to run. At that point, will systemd start a second instance ...
0
votes
1answer
20 views

A generic cron wrapper that records all output

I am hoping to write a cron wrapper that records all output in a folder $CRON_LOG_DIR. It would be used as, e.g., follows: * * * * * $CRON_WRAPPER "<job name>" "command" which would record ...
1
vote
3answers
33 views

Cron job working, but crontab -l says no jobs

I am running raspbian on a pi and installed cron to schedule a job. I wrote a python script and I set it to run every 5 minutes. The job is happening every 5 minutes, no problems, but when I run ...
0
votes
2answers
41 views

problem with cron job for every 2 minutes

I have a cron job for very 2 min and somebody told me that some servers do not allow 2 min cron jobs. basically from 30 min. it is true?
4
votes
2answers
247 views

Upgrading packages automatically

I'm fairly new to using servers (debian 7) and I'm currently running cron-apt to e-mail me when there are new upgrades available. Is the following command safe to run when new upgrades are shown? ...
2
votes
0answers
59 views

How to overcome this error when running a script in crontab?

This is basically my script. #!/bin/sh #set -x ...
0
votes
1answer
36 views

Usage of '%' in the crontab [duplicate]

I am trying to add a cron job to perform an rsync from a remote server to a (Ubuntu12) local machine & create a log file. Below is the crontab-l 00 18 * * * rsync -a -v --delete -e ssh ...
0
votes
1answer
41 views

Crontab giving no result

I have set up a cronjob on my server which is supposed to run every minute and store the output in the given file. I have been trying a lot and saw a lot of links but nothing seems to work. Following ...
2
votes
2answers
30 views

how to get the run results of the cron job

I wrote a simple Hello World Java Program and created a jar file of it. Now to test the cron job, wrote a crontab.txt file with the line 50 12 27 4 1 java -jar HelloWorld.jar and saved it. At the ...
0
votes
1answer
18 views

Incrontab / Incron on Cygwin

Does anyone please know if it is possible to install incron/incrontab within Cygwin? I've had a look and the package does not appear on the cygwin website, I wondered if anyone had tried, knew of any ...
1
vote
0answers
22 views

How do I process new additions to logs

I know that I can use a few tools like tail and less to view the newest additions to a growing log file. What I want to do, though, is run some sort of script at regular intervals (like cron) on the ...
2
votes
1answer
55 views

Script not run with cron [closed]

i have a python script when i launch my script all it's ok but when i lauchn my scrypt under crontab i have this errors: .. 2015-04-24 14:36:02,163 ERROR Problème dans le module ...
2
votes
2answers
30 views

Cron job is writing the error to error log but fails to write outputs to output log file

I have 2 python codes which i schedule using cron. My codes actually runs from 10:30am to 4:20pm everyday. from 10:30am to 11:00am my codes outputs 2-3 lines every minute and after that they start ...
3
votes
1answer
39 views

What could be happening between pidof and kill to cause “no such process”?

I've inherited quite a bit of code and am looking at a cron job that restarts a service once an hour, no other scripts touch this process and this code is ran. #The name of the process has been ...
2
votes
1answer
69 views

Default umask for cron jobs

How to set default umask for cron jobs, please? (On RHEL 6.) Jobs are started under non-interactive (obviously) no-login (?) shell. Not only I prefer dash over bash. But consider also bash called as ...
0
votes
0answers
56 views

Schedule backup with notification?

To avoid editing files at the same time of backup scheduled by cron, I figure out a way: Before backup, send a desktop notification such as notify-send -t 0 "Ready for backup", to let me prepare ...
-1
votes
3answers
48 views

My cron job doesn't run

I set up to run notify-send every minute, $ crontab -l 1 * * * * /usr/bin/notify-send -t 0 "hello" Why does it not work? Do I need to restart OS after editing the crontab file? Does the following ...
2
votes
1answer
42 views

Why cron jobs' output keeps getting written to ~/dead.letter?

I have a job scheduled by cron running every day, and the job is about compressing a folder using tar; and I found that the standard output of tar keeps getting written into ~/dead.letter everyday. ...
0
votes
1answer
25 views

Does a job scheduled in crontab run even when I log out?

I add some job in crontab file on a server. When I log out and the server is still on, will the job still run? Does it matter if I create a screen or tmux session and run some shell in it and ...
0
votes
0answers
38 views

editing files at the same time when cron automatically runs backup

I heard that it is a good idea to schedule backup in crontab file. I also head that it is bad to edit files while they are backed up. It may happen that cron stats to backup a directory while I am ...
2
votes
3answers
111 views

Shall I save my crontab file in /tmp?

I ssh to a server, and want to add some daily jobs (specifially to renew Kerberos tickets even when I log out and I still want my programs in screen or tmux continue to run) to cron. So I run crontab ...
1
vote
1answer
37 views

delete redis keys that have been inactive for 30 days

I've installed a web app called scrumblr which uses redis as a database. What I am attempting to do is delete all keys that have been inactive for 30 days, or have not been accessed in 30 days. I ...
0
votes
1answer
57 views

Whats the best way to clear / empty Apache log files periodically

I am running Apache server on lubuntu linux, Since there are plenty of applications ruining on the web server with 10+ users accessing the server regularly, the server logs [access & error logs] ...
2
votes
2answers
104 views

Is it possible to schedule a cron job to run fortnightly?

Is there a way to schedule a cron job to run every fortnight? (One way I can think of, within crontab, would be to add two entries for "date-of-month"...)
1
vote
2answers
54 views

Do I need to keep an SSH session alive for cron to run?

I know about nohup. It prevents processes from dying after a hang-up. What I want is my user crontabs to run even if my session has timed out when they are supposed to run. I believe I need the user ...
0
votes
2answers
37 views

Auto Delete Inactive files after x

Is there a way I could delete certain folders after x amount of days of inactivity? I was thinking of using cron but that wouldn't take the inactivity part into consideration. Is there any Debian ...
3
votes
2answers
241 views

Location of the crontab file

as many (most?) others, I edit my crontab via crontab -e, where I keep all routine operations such as incremental backup, ntpdate, various rsync operations, as well as making my desktop background ...
5
votes
4answers
251 views

Change the time zone of a cronjob

I have a cronjob which is executes every day at 9:00 AM of UTC-Time. I'm in GMT+1 so it executes at 10:00 AM local time. When there is the timezone change (to daylight saving time, DST), the cronjob ...
0
votes
2answers
29 views

Crontab to back up directory

So I have this in my crontab -e 0 0 * * * /opt/www/backup.sh And in the file, I have the following: #!/bin/bash FILENAME=$(date +%Y%m%d).tar.gz tar zcf backups/$FILENAME f The file is located at ...
-1
votes
1answer
38 views

Cron job * is replaced by file name in current directory [duplicate]

This is my first shell script program, so i think this is more likely a silly question for you all. Overview of problem My need is to write a shell command for installing our Node.js server. ...
0
votes
4answers
99 views

cron - production-ready alternative

I am testing out a Raspberry Pi with the aim to use it in a production system for logging manufacturing data. All is working well and I have been recording test data over the last month. For ...
0
votes
0answers
43 views

shell calling another shell program fails when run by crontab

I have scheduled to run the run.sh program like this: 16 09 07 * * root /opt/db_maintain/run.sh > /opt/db_maintain/temp-log and here is the run.sh: #/bin/bash #********* Saman ********* ...
3
votes
2answers
125 views

How do I format these two complex cron statements?

I need two very specific cron statements: A cron entry that would run on the 2nd Monday of each month every 4 hours beginning at 02:00 and execute the file /opt/bin/cleanup.sh A cron entry that ...
0
votes
1answer
38 views

How to set path in cronscript

I am running a cronscript like: */45 * * * * /path/to/php /path/to/file.php it creates a file and put on home directory; But I want to create this file in my desired path like: */45 * * * * ...
0
votes
0answers
47 views

Synology jailkit debian cron debootstrap

I have a Synology NAS. For advanced using of my server, I installed a debian with chroot-jailkit and debootstrap. I follow those instructions (in french sorry) This is working really fine. I have ...
0
votes
0answers
39 views

How do I realize a Shell Script that keeps track of how long the keyboard has not been used ?

Is it possible to write a script that counts the time between two pressed keys, so that one could put a script into the crontab that checks if the keyboard had not been for longer than a certain time ...
2
votes
4answers
118 views

Calling scripts from inside other scripts

I have a script which I call every 10 minutes with a cronjob: */10 * * * * ~/mydirectory/myscript.sh Now, inside ~/mydirectory there is also another script, let's say myotherscript.sh which I'd ...
0
votes
3answers
93 views

crontab is launching multiple java process every 5 minutes?

I have a java runnable jar which I need to run it if it not running or got killed for some reason so I decided to use crontab for this - I need to run the crontab as "poppetapp" user so I am logged ...
0
votes
1answer
83 views

systemd timer every X days at 04:00

I have been reading on OnCalendar= Sadly, I found no info on how to schedule an event on a day other way than defining a day of the week, which would make it run every week at the rarest. I need ...
1
vote
1answer
50 views

cron and at send mail to wrong user

I have cron and sometimes at on an ubuntu 14.04. jobs output should be mail to me, but failed. I make a .forward in my home dir. mail explicitly send to local unix user is forwarded to my corp mail ...
-1
votes
1answer
52 views

cron/ bash is not working via scripting, scoping issue?

I'm trying to schedule a task to run ever minute using cron: * * * * * /home/yzm/simple.sh >> /var/log/cron.log and this returns: bash: yzm: command not found cd-ing out of that folder: cd ...