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

learn more… | top users | synonyms (1)

1
vote
3answers
41 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
47 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
256 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
68 views

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

This is basically my script. #!/bin/sh #set -x ...
0
votes
1answer
50 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
47 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
33 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
32 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 ...
2
votes
0answers
28 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
65 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
37 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
45 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
164 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
64 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
75 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
55 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
40 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
39 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
188 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
49 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
93 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
165 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
62 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
44 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 ...
4
votes
2answers
298 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
276 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
35 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
40 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
142 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
52 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
142 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
40 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
72 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
45 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
167 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
133 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
124 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
58 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
63 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 ...
2
votes
1answer
109 views

Cron job not running after giving command in crontab

I am trying to run a cron job in Linux with following command: crontab -e typing the following details and saving it MAILTO="mail@domain.com" 00 01 * * * /usr/local/bin/php /var/www/html/cron.php ...
1
vote
2answers
53 views

Cron job gives no output

I tried to schedule my first cron job as follows: crontab -e The file had some comments at the top, and on the first line after those, I put * * * * * date I expected the date and time to be ...
1
vote
4answers
213 views

crontab not launching one script

I have issue with my crontab - cron is not launching one of my scripts this is top part of my crontab (root) SHELL=/bin/bash #--------------------------------------- # Items availability ...
1
vote
1answer
110 views

Run shell script from crontab after server stop/start/restart

I want to schedule a shell script in crontab that runs whenever server restarts. It should also run when someone starts the server after it stops abruptly or crashes. How to do so in crontab? Any ...
1
vote
0answers
106 views

'nc' using ~100% CPU when transferring a FIFO file

On the server which is always connected I’m using this in a crontab: @reboot nc -k -l 1337 < /tmp/fifo.fifo On the client which is not always on the network or switched on I’m using this ...
1
vote
1answer
125 views

how to temporarily disable a user's cronjobs?

How do I temporarily disable one or more users' cron jobs? In particular, I do not want to suspend the user's cron rights - merely not fire any of their jobs. I am on SLES 11 SP2 and SP3 systems
4
votes
3answers
953 views

Running a script during booting/startup; init.d vs cron @reboot

I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system. The use of @reboot (this method was mentioned in this forum ...
0
votes
1answer
44 views

Having problem with mysql dbdump when password starts with special character

I am trying to take a db backup with a php file that is running from a cronjob. It was running fine when I tested with sample db. But when I used the actual db there was an error. I am using ...
0
votes
1answer
24 views

cron: output of a script?

I've got a cronjob that looks like this 0 0 * * 7 [ $(date +\%d) -le 07 ] && /home/archiver/archiver.sh &> /home/archiver/output And it works from the cron+bash perspective in that ...
0
votes
0answers
57 views

Using a custom script for cron jobs mail notification

After coming across Mailgun I would like to write my own script to use their API in order to send mail notifications from cron jobs — avoiding in this manner having to worry about installing a ...
0
votes
1answer
85 views

Add cron job via single command [duplicate]

First of all, I'm using elementary OS (based on Ubuntu 12.04). I have a cron job set up to run a script every day at 23:30: 30 23 * * * /path_to_script/ Is there a way to add it to cron via a ...