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

learn more… | top users | synonyms (1)

1
vote
4answers
143 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
30 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 ...
12
votes
1answer
284 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
18 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
34 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
49 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
39 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
34 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
39 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
38 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
44 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
21 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
36 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
31 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
67 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
33 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
64 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
52 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
40 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
50 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
41 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
51 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
44 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
20 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
39 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
57 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
735 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
40 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
33 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
32 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
88 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
57 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
76 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
28 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 ...
1
vote
2answers
96 views

How can I start program on boot in Ubuntu 14.04?

Is the root crontab the only way? I'm starting up a MC server and don't want it to need me to manually restart it each time the server reboots for whatever reason. I don't want any login required ...
0
votes
2answers
89 views

Execute a shell script via crontab

Currently I got stuck by trying to execute a shell script via crontab. It does not work and I can't figure out what is wrong here. What I want to do is: Execute a javascript (index.js) file with ...
1
vote
2answers
27 views

why /etc/cron.hourly/myjob not working?

In /etc/cron.hourly, there is one file: -rwxr-xr-x 1 root root 117 Mar 8 20:33 myjob myjob: 3,18,33,48 * * * * /usr/bin/python /home/me/src/myproject/src/manage.py myjobs > /home/me/log 3,18,...
1
vote
1answer
53 views

Crontab resetting itself

I have a computer with Ubuntu server 15.10 installed on it that sits in the same room I am in. I use it just as a Minecraft server, map renderer and whatever else php scripts I want to run scheduled ...
0
votes
2answers
72 views

Edit crontab without SSH access [closed]

I have Debian VPS and I gave FTP access to somebody, say John. I don't want to give John SSH access, but he needs to put tasks into crontab. What are my possible variants?
1
vote
2answers
30 views

Shell script says system when to execute for the next time

I've got a shell script. It is supposed to be executed automatically on and on over time. Maybe about three times a day. But I don't want to write a cron job for it since it's not the same time every ...
0
votes
1answer
50 views

Output of cron to file

I have a text file topcommand.txt which has a command as below: * * * * * /usr/bin/top -c | grep 'some process name' >> /home/abcd/topout.txt When I invoke this using crontab topcommand.txt,...
3
votes
1answer
29 views

How would you build a cron that empties the mail in all mailboxes?

I am new to Unix here. We have some mailboxes that are taking up an incredible amount of space and I'm trying to figure out a way to delete all mail that has been in the box for 30 days. Most of what ...
3
votes
2answers
132 views

Crontab shell script git pull and forever start

I'm trying to set up a Raspberry Pi to check a repo on startup and then fire up a node script with forever. I got the second part working, but I tried a dozen git commands with no success. Here is ...
0
votes
1answer
45 views

AIDE is taking forever to initialize

I have a server at home that I use as a NAS and some other services. The server has Debian Jessie on it, with 4x 4 TB harddrives in RAID5. I use this server to store all my home data, movies, games, ...
0
votes
0answers
11 views

Is an automating apt-get update+upgrade unreliable or dangerous? [duplicate]

I use currently for updating my system a manual apt update && apt upgrade, usually sometime after my system has started. Unfortunately, sometimes I run that really late or even forget it. I ...
1
vote
0answers
41 views

Program/script to limit cronjob output

Short version: Is there an off-the-shelf program to avoid being pinged repeatedly be frequent cron jobs in periods when they fail? I have a custom implementation but it seems like something someone ...