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

learn more… | top users | synonyms (1)

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
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
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 ...
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 ...
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
344 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
38 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
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/...
1
vote
1answer
45 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
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
72 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
336 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
34 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
69 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
54 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
41 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
42 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
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.
2
votes
2answers
4k 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
1
vote
1answer
64 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 - ...
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 ...
3
votes
1answer
724 views

Permission denied when running logrotate with anacron

I am trying to figure out what is causing anacron to send me the following error message: /etc/cron.daily/logrotate: /var/log/mariadb/mariadb.log-20140710.gz: Permission denied error: error running ...
1
vote
3answers
1k views

No syntax highlighting when editing crontab

I am trying to figure out why I don't have syntax highlighting when editing my crontab. I have both $EDITOR and $VISUAL set to /usr/bin/vim: > echo $EDITOR /usr/bin/vim > echo $VISUAL /usr/bin/...
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 ...
2
votes
3answers
24k views

Globally change path for all users, even in cron

We're setting up an SGE cluster with CentOS 6. My sysadmin is installing applications that are not installed via RPM (i.e. via other means like make install) should go in a non-standard directory, in ...
1
vote
0answers
91 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. &...
23
votes
3answers
96k views

crontab's @reboot only works for root?

man 5 crontab is pretty clear on how to use crontab to run a script on boot: These special time specification "nicknames" are supported, which replace the 5 initial time and date fields, and ...
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
2answers
3k views

Send backup by email with crontab

I use this cron job to do a backup of /home/blah/ each day at 01:00 a.m. : 0 1 * * * tar -zcf /home/blah/backup.tgz /home/blah/ In fact I would prefer that an email is sent to me with the .tgz file ...
-2
votes
3answers
80 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
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 ...
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
103 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
92 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 ...
0
votes
2answers
228 views

How to automaticly open a URL at specific times each day

I am using kubuntu 14.04. I have installed cron using sudo apt-get install cron, and then I created this file in IDLE, called openurl.py. #!/usr/bin/env python import webbrowser webbrowser.open('...
1
vote
2answers
4k views

Run gui application on startup

I can run a script at boot by adding the following line to my crontab: @reboot perl /path/script That works fine. But the problem arises when I try to run a gui application such as gmail notify. It ...
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,...
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
1answer
4k views

Null message body; hope that's ok

I have the following command below as part of a cronjob. When I run the command via cron or at the command line, I get Null message body; hope that's ok. The contents of the email are empty but when ...
0
votes
1answer
46 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, ...
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
136 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 ...