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

learn more… | top users | synonyms (1)

2
votes
0answers
46 views
0
votes
1answer
23 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 ...
1
vote
1answer
869 views

mail: cannot send message: process exited with a non-zero status

I've had a cronjob working for about a fortnight without any problems. Then last night I checked I didn't get the email that I usually get. I went to the terminal to try send myself an email, I got ...
0
votes
1answer
37 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
22 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 ...
4
votes
3answers
303 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
15 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 ...
3
votes
2answers
642 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 ...
2
votes
1answer
53 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 ...
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
2answers
27 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
36 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 ...
0
votes
0answers
46 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 ...
2
votes
1answer
32 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 ...
2
votes
1answer
33 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. ...
-1
votes
3answers
35 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 ...
0
votes
0answers
37 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 ...
0
votes
1answer
22 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 ...
2
votes
3answers
89 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
31 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
45 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
75 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"...)
2
votes
1answer
76 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
50 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 ...
1
vote
2answers
508 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 ...
0
votes
2answers
36 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
223 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
240 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
24 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
34 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
83 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
39 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 ********* ...
0
votes
1answer
992 views

CRON job to check if PHP script is running

I am having trouble regarding CRON jobs, I've basically got two php scripts that I want to keep running continuously on my server. Currently I am using an infinte loop to keep them going but they seem ...
3
votes
2answers
119 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 ...
4
votes
4answers
1k views

Is setting a higher nice level for a process an effective way to reduce its impact on system load/CPU time?

I have an rsync cron job which is pushing the server load and triggering monitor alerts. If I set the job to be run with a high nice level, would that effectively reduce the impact it has on system ...
2
votes
1answer
524 views

How to respawn vpnc when it stops?

As root, I've setup a crontab rule that launches vpnc everyday early in the morning (before I arrive at my workplace). But it often occurs that the vpn stopped mid day. As a result, I have to sudo ...
0
votes
1answer
37 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
33 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 ...
1
vote
1answer
118 views

User cannot access crontab

Oracle Linux 5.10 Root user can access crontrab, but not any other user. There is no /etc/cron.allow and the /etc/cron.deny is an empty file. Using Oracle user account: [oracle@dub-ImrORA2 ~]$ ...
0
votes
0answers
37 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
95 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 ...
9
votes
3answers
4k views

Using notify-send with cron

I am using Arch Linux with KDE/Awesome WM. I am trying to get notify-send to work with cron. I have tried setting DISPLAY/XAUTHORITY variables, and running notify-send with "sudo -u", all without ...
0
votes
3answers
74 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 ...
1
vote
4answers
148 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 ...
19
votes
2answers
81k views

How can get a list of all scheduled cron jobs on my machine?

My sysadmin has set up a bunch of cron jobs on my machine. I'd like to know exactly what is scheduled for what time. How can I get that list?
0
votes
1answer
68 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
votes
1answer
50 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 ...
1
vote
1answer
41 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
vote
2answers
37 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
2answers
177 views

How to restart my java program automatically if it gets killed?

I am running my runnable jar in linux machine (machineA) as shown below. In the runnable Jar, I have a java program which sends email to me every 15 mniutes. ...