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

learn more… | top users | synonyms (1)

1
vote
3answers
121 views

add text on line before match

Trying to add text on the line before that it find the match (updateKey.sh) in this case, but won't get it to work. Here is my crontab file that the script adds the line to 0 06,18 * * * /home/server/...
-2
votes
2answers
59 views

Why does running a Cron Job as root stop the sshd service and disallows login for other users?

I have a script for getting Clamav updates from another server which I run as a Cron job as root. Also, I have root login disabled for /sbin/nologin. But this has serious implications on the system as ...
0
votes
1answer
106 views

CRON: pam_unix(cron:session): session opened for user root by (uid=0): Is it a must have process?

This post is somewhat similar but mine is rather specific. CRON: pam_unix(cron:session): session opened for user root by (uid=0) Is this really a bug? In our system this process is creating ...
0
votes
0answers
24 views

cron job quit working after latest apt-get upgrade

I've been running a cron job every 15 minutes for years, with few problems. Sometime in the last week, it quit running, I'm assuming after a apt-get upgrade && apt-get dist-upgrade. I was ...
1
vote
1answer
61 views

Two cronjobs not working (one to start a process, one to stop a process)

I typed the following into crontab -e 0 0 * * * bitcoind -datadir=/home/pi/bitcoinData -daemon 0 6 * * * bitcoin-cli -datadir=/home/pi/bitcoinData stop I expect this to run bitcoind -datadir=/home/...
0
votes
1answer
46 views

Crontab: Why won't it execute script

So in the past I just did a simple shutdown crontab, and that was it. Lately, I want to do something a bit more complex, so I'm trying to get it to run a script. Right now I've boiled it down to a ...
3
votes
1answer
42 views

Why am I seeing much more cron jobs in webmin than in `crontab -e`?

I am just starting to learn cron jobs. Basically I am going to use webmin to manage my cron jobs, I am also reading some basic information about cron jobs. So far I've learned that /etc/crontab ...
1
vote
1answer
164 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 --no-...
0
votes
1answer
62 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 ...
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 ...
0
votes
1answer
62 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 ...
0
votes
1answer
36 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
199 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 --...
3
votes
1answer
31 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 ...
13
votes
1answer
476 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 ...
0
votes
1answer
43 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 ...
0
votes
1answer
20 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 ...
1
vote
1answer
30 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) ...
0
votes
1answer
37 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
vote
0answers
71 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 ...
0
votes
1answer
40 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
35 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
45 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
39 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
51 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 ...
0
votes
0answers
22 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 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/...
0
votes
2answers
44 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
1answer
33 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
94 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 ...
1
vote
1answer
38 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
76 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
56 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
48 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
53 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
45 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
57 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
1answer
48 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 ...
1
vote
1answer
21 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
44 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.
1
vote
1answer
101 views

What are the filesystem permissions for a cron job?

I'm working on a production server. It has some daily cron jobs, and here's the filesystem permissions on them: cron.daily$ ls -Al total 24 -rwxr-xr-x 1 root root 332 Dec 3 10:33 0yum-daily.cron -...
0
votes
1answer
37 views

When do cron tasks begin to execute?

Having read through the Wikipedia page on cron, it is unclear to me when cron begins to execute the tasks I have defined in the crontab file. Is it during the boot process - or even at the end of it - ...
16
votes
2answers
743 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
41 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 ...
0
votes
1answer
35 views

Why is crontab executing on one server but not the other?

I have two servers on linode that have some websites on them. I created a script to see if mysql is running on the server and if it's not running then the script will start mysql. The script is on ...
0
votes
2answers
33 views

Is it safe to allow users to use cron to schedule tasks? [closed]

If a user is granted permission to schedule cron jobs, i.e. by being listed in cron.allow, does this make them any more of a "threat" to the system than a user without that permission? In my case I ...
1
vote
0answers
113 views

php curl script working in cli but not on crontab [closed]

I have set the following on crontab */1 * * * * /opt/php-5.3/bin/php -f /var/httpd/appliance/appliance/docs/vip_dashboard_script.php >> /tmp/vip.log 2>&1 the contents of my script. &...
1
vote
1answer
58 views

Cronjob running but no crontab for user?

I'm having troubles with my crontable on the scientific cluster I'm using. It's a bit peculiar, since the jobs seem to run (I get regular mails from some updates) but when I type crontab -l the ...
-2
votes
3answers
95 views

linux crontab + how to set crontab at 23:00

please advice how to set the crontab in linux to run a task each day at 23:00 at night and if someone know a shell script that we can run in the linux that can help us to set acrontab syntax
1
vote
1answer
29 views

Crontab Line Date

I'm getting ready to launch a crontab, but since I'm new at it, wanted to check with someone if they could verify that what I'm doing is correct. * 3 * * 5 /usr/local/bin/backup.bash The above ...