Crontab is a short form of cron table. It is a configuration file that specifies shell commands to run periodically on a given schedule.

learn more… | top users | synonyms

-1
votes
1answer
14 views

How to create a variable in crontab for a date from last week

I am trying to set up a cron job, using a script that needs to be occasionally run interactively. So far it looks like this: 59 1 * * 1 /weekly.csh date +\%Y\%m\%d date +\%Y\%m\%d >> log What I ...
1
vote
1answer
14 views

Where is my crontab file on OS X?

Moving to a new laptop I've lost my old cron setup. I'd like to include it in my backup going forward. Where is it located?
0
votes
0answers
17 views

Loading kerberos keytab from root cron

When I run a script (see below) to load a kerberos keytab from a users cron it works just fine. Running it from root cron however a password is asked for the keytab and it aborts with: kinit: Generic ...
1
vote
1answer
19 views

why don't cron jobs in /etc/cron.d directory appear in crontab -e?

I do sudo crontab -e and see a bunch of cronjobs. If a cron exists in /etc/cron.d but not in sudo crontab -e does that mean it's not being ran? Or is it being ran but just isn't showing up for ...
0
votes
1answer
17 views

echo does not apply a line to crontab

Want to apply this to crontab: crontab -l > nopass echo 'ALERT - Found a user without password on:' `hostname` `date` | cat /etc/shadow | awk -F: '($2==""){print $1}' | mail -s "Alert: Found a ...
0
votes
0answers
18 views

Crontab Ubuntu 14

I have a problem with crontab, I can not add new task I try to add new line * /5 * * * /usr/bin/rsync -avz /home/fm-x2/Dokumenty/pliki /mnt/share/homedir/ EDITOR="gedit" crontab -e or crontab -e ...
0
votes
1answer
43 views

use multiple @reboot commands in crontab

I searched this website and Google but couldn't find it.. How can I execute two (or more) commands using @reboot ? What I have now: @reboot /root/website1/starter.sh What I want: @reboot ...
9
votes
1answer
914 views

Cronjob runs before the scheduled time, what could be wrong?

I have below crontab scheduled for Saturday that falls between days 19-23, I' m not sure why it ran on 20th (Friday). Any guesses? 00 21 19-23 * 6 <command>
0
votes
1answer
120 views

Cron strange behaviour

I've got a Bash script with all the permission to be excecuted, I attach it to to a cron job, this script basically only kill and restart a specific process, the strange behaviour is that if i run the ...
0
votes
0answers
68 views

Cannot write to text file from python

I have a program in python, which takes data's from system and puts them to the text file line by line. Everything works properly when I run it from terminal using: python myprogram.py Every-time I ...
0
votes
0answers
30 views

I want to run a script that will disable my touchpad

I want run a script that will disable my touchpad and it will run every minute. 1. My script is: if [ `lsusb | wc -w` == '76' ] then `/usr/bin/xinput set-prop 16 "Device Enabled" 0` else ...
1
vote
2answers
36 views

Crontab expression for run once between time range that crosses midnight

Is it possible to come up with a cron expression that runs every five minutes between 12th October 2015 19:00 and 13th October 2015 07:00?
0
votes
1answer
58 views

Backing up user accounts in linux

Following is my steps to backup user accounts with scheduling: `sudo crontab -e. 0 0 * * * sudo tar -cpzf /backupfolder/user1_backup-$(date +\%Y--\%m-\%d).tar.gz /home/students/user1 0 0 * * * sudo ...
0
votes
1answer
70 views

Crontab doesn't run my schedule backup on Ubuntu

I created a backupfolder in my root directory. Following is my command to run a backup task in crontab -e: * * * * * sudo tar -cvpzf /backupfolder/user1_backup-$(date +%Y--%m-%d).tar.gz ...
0
votes
0answers
79 views

Execute crontab as root not working

I need to execute a backup script each night. When I execute manually, backup is done without problems, but I use sudo crontab -e and add the script there: root@SF-DES-SVN:/home/svn# crontab -l # m h ...
0
votes
2answers
39 views

Cron expression hour 1/12

I'm looking at a system where someone added a cronjob which schedule is like this: 0 1/12 * * * doSomething More commonly, if the hours part in the schedule were */12 then it would execute every 12 ...
0
votes
1answer
170 views

Crontab scheduled backup not running

I need to have the ZIP compression happen on a different drive than the server due to limited space. Here is the command is the line I use in crontab: 00 1 * * * osmc cd ...
-1
votes
1answer
93 views

Why is this crontab not working?

I'm a crontab beginner. Why does this crontab do nothing? I would like it to run the script every minute. 1 * * * * /home/android/test.sh If I just type /home/android/test.sh in the shell it works ...
0
votes
1answer
91 views

How to configure a cron.d crontab file for root

What's the procedure for installing a cron.d crontab file to be run as root? I have a script I want root to run every 10 minutes, so I installed the file /etc/cron.d/mycron: SHELL=/bin/bash ...
0
votes
1answer
97 views

Cron Error : chdir failed (/usr/share/httpd): - Using Nginx

(CRON) ERROR chdir failed (/usr/share/httpd): No such file or directory I checked the log and found the following error. Why does cron tries to change the directory? I am not using httpd. I am ...
1
vote
2answers
604 views

Crontab command cannot be executed. Error PAM configurations

Here's the command that I would like to execute but it seems not to work. [mdubois@veloce ~]$ crontab -l Autorisation refusée You (mdubois) are not allowed to access to (crontab) because of pam ...
0
votes
1answer
25 views

Cron file in cron.d isn't running at all, why?

I am unable to run my cron file stored at /etc/cron.d but it wouldn't run for unknown reasons :/ can someone please help? Content of my cron file is as follows: ...
1
vote
1answer
31 views

Trigger a command upon every `crontab -e` edit

We are using a shared Linux server account where as everyone comes and edits the crontab. Usually we take a backup like this crontab -l > `date +\%Y-\%m-\%d\_\%H:\%M:\%S.txt` Is there an ...
1
vote
1answer
144 views

scheduling with cronjob to run the php file for only one time

How do I run the php file only once using the cron jobs. i.e., to schedule task to work on 20/06/2015 10:30:00 I tried something like this : 30 10 20 6 ? 2015 /usr/bin/php ...
0
votes
1answer
143 views

Is crontab running old version of file?

This has been driving me crazy: I run a set of Python scripts once per hour on a Raspberry Pi. I updated one of the scripts, but even after a reboot, it still seems to run an old version of the file. ...
3
votes
2answers
299 views

How do I run a `/usr/sbin/` binary in cron?

As root I added used crontab -e to add my script. However the script uses a binary in /usr/sbin/ and I get an error about it not existing when the script runs from cron. How do I fix this?
1
vote
2answers
1k views

cron expression for every hour starting from specific time

Every one hour (starting from "now") I am able to schedule using this cron expression (expression) using nodejs cron-job. But I need to set cron every one hour starting from a specific time. For ...
0
votes
1answer
19 views

schedule a crontab to shutdown the machine after a specific process (with PID) has finished

Say I have this process with PID = 1234 currently running. I don't know how long it's gonna take for it to finish. Is it possible to schedule a cron tab to keep checking for the status of the ...
1
vote
2answers
267 views

Automating an ssh connection with crontab

I've been struggling to crontab automate a git push process with ssh, and it's proving tricky to setup a key with the ssh agent. Starting with a basic script to test the agent: # set paths (all ...
0
votes
1answer
171 views

automatically start netcat on localhost and remote-host and keep it active

I found this answer by @jeremytrimble on Stack Overflow which explains how you can read a FIFO file over network. I wonder if it’s possible to start these netcat commands automatically, e.g. in a ...
0
votes
1answer
152 views

Why are some of my cron jobs not sending emails?

To send emails, I use the standard configuration with: MAILTO="example@gmail.com" Here is the content of my crontab: 00 3 * * 2 echo "Internal Backup (mysql) has started!" && tar -zvcf ...
0
votes
1answer
404 views

cannot rsync via ssh from crontab

I'm having issues transferring files with rsync via ssh. If I just run rsync -avz devel@10.10.10.83:/home/devel/ $/home/user/rsync/servidor it works as expected since the public key is stored in ...
0
votes
1answer
110 views

Incron Job is not being executed

I am using incron to monitor one of my file in /var/www/html directory. output of incrontab -l /var/www/html/test IN_ACCESS /home/intel/test.sh This job is supposed to create a file in home ...
0
votes
1answer
69 views

Check for screen using crontab

Currently, I'm using Debian with the following cronjob for screen at reboot: @reboot screen -dmS app1 /home/app1 @reboot screen -dmS app2 /home/app2 The problem is, that sometimes the application ...
1
vote
2answers
5k views

How to save Crontab edits?

I ran crontab -e and made some changes, now how do I save it?
0
votes
0answers
116 views

Not able to open crontab -l

I am running crontab -l to view the crons on a RHEL server(v5.10) and getting the below error: crontab: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such ...
0
votes
1answer
346 views

Crontab x minutes past every hour on Ubuntu

I haven't been able to find an example of how to run a command in crontab at 5 minutes past every hour. I assumed that this would work 5 */1 * * * But it doesn't run. Can anyone help? Thanks in ...
1
vote
1answer
68 views

Crontab cannot find program installed in local user's bin dir

I am trying to run a bash script on a dreamhost account that does some backup operations. The program I use to do the backup is installed in the home directory of the web hosting account under ...
0
votes
1answer
124 views

Cron jobs on IBM i 7.1

I just found out today that on an IBM i system I am able to use SSH to get to a Unix-like terminal (AIX/PASE) and would like to use this to schedule automated tasks using crontab. Does anyone know if ...
0
votes
2answers
356 views

Why is this cronjob not working?

I have a ruby script in ~/custom_scripts/get_all_products.rb. I want it to run every night at 04:00. Here's what the cronjob in crontab -e looks like: MAILTO="<email>" 0 4 * * * ruby ...
0
votes
1answer
35 views

How to execute a Linux Cron Job from day x to y on crontab?

I found that I can use an hour range by using a slash, for instance, 4-20 to run from 4AM until 8PM. But what about day range? Can I use something like: * * 5-20 * * CMD
0
votes
1answer
250 views

crontab and binaries in /usr/local/bin

I am working in Redhat and have few programs located in folder /usr/local/bin I would like to call from crontab for root user. I thought that by putting binaries in that folder would be sufficient to ...
2
votes
0answers
45 views

Performance loss when having too many files in /etc/cron.d?

Is there an amount of files in /etc/cron.d that would lead to worse performance? There are currently about 50 jobs in. In the future there can be up to 200 files in. Am I correct to expect the cron ...
0
votes
1answer
100 views

setting gvim as editor for crontab

I've see many post saying that by setting the following evnironment variable EDITOR=vim or VISUAL=vim will allow to use vim as code editor for crontab. I would likt to try to use gvim instead ...
1
vote
0answers
35 views

How can I run a cron job from PM to AM? [duplicate]

I want to execute a script once an hour from 20:00 to 08:00. Would the following work? 0 20-8 * * * location_of_script_to_run I'm currently using the following: 0 20,21,22,23,0,1,2,3,4,5,6,7,8 * * ...
0
votes
1answer
526 views

How can I set the terminal encoding when running a crontab job?

I have a crontab job which executes a Ruby script on Arch Linux. It works basically, but when I call "googlecl" to post to my blog, it always shows a "safeDecodeError" exception (eg.: ...
3
votes
4answers
2k views

crontab still sending emails even with > /dev/null

I have a crontab (root) that runs a script and output is set to > /dev/null but I always get the emails whenever it runs. I only want to receive error emails. # Rackspace driveclient update (12pm ...
1
vote
3answers
77 views

Execute script when process reaches 6 hours of lifetime

I wonder if it's possible to execute a perl script when a process with a given PID file reaches a total of 6 hours of lifetime? Can this be done through crontab or similar? The perl script I want to ...
0
votes
1answer
326 views

redirecting output in crontab

I have a shell script to monitor table stats and java apps. It works fine when I run manually. But if I put it in the crontab it will get stuck if I don't redirect it's output with export display ...
0
votes
1answer
175 views

Cronjob immediately shuts down mac after boot

I was messing around with cronjob trying to get it to forcibly shut down at a certain time everyday, but now I can't keep my computer on. It boots, loads whatever needs to load on startup, then ...