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

0
votes
2answers
16 views

cron job on centOS 6.5

I have used these 2 references to insert a new crontab entry. redhat ubuntu I have created a new bash file and moved it to /usr/bin. That sh file has execute permissions for the root user and the ...
3
votes
2answers
69 views

How to start a screen session from a shell script using crontab and then reattach to it?

I want to run the following shell script (launch.sh) to start/stop a screen session using crontab !/bin/bash cd ~/screen DATE_FORMAT=+%Y-%m-%d:%H:%M:%S echo --- START --- date $DATE_FORMAT if [ ...
0
votes
2answers
46 views

Can't start a job with Cron on Ubuntu startup

I am trying to get a simple Python script running on startup with Cron on Ubuntu 16.04. What I did is opened cron with: sudo crontab -e and added the last line as shown in the screenshot: Then I ...
0
votes
1answer
35 views

Failed to edit crontab (linux Alpine)

I faced with an error during cron manipulation under my non-root account. bash-4.3$ crontab -e crontab: must be suid to work properly Here is an output on id command: bash-4.3$ id uid=41532(fred) ...
0
votes
0answers
13 views

cron expression day of month AND day of week, instead of OR?

Probably not, but is there any way to make DOM and DOW in a cron expression be an AND relationship? For example: "0 0 1-7 * thu" Means: At 00:00 on the 1, 2, 3, 4, 5, 6 and 7th of every month and ...
1
vote
1answer
49 views

rsnapshot: What's wrong with my crontab?

I am using Rsnapshot for backups (Linux CentOS 6). Here is my /etc/cron.d/rsnapshot: 30 11 * * * root /usr/bin/rsnapshot nowandthen > /backups/rsnapshot_cron.txt 2>&1 15 11 * * 4 root ...
0
votes
1answer
20 views

Centos freezes, when trying to open crontab

I'm trying to open crontab, but when i type it the whole os just freezes... I thought, maybe that's because vim isn't installed, but it is. I also checked the cron.allow and cron.deny files, but they ...
-1
votes
1answer
20 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
28 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
59 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
32 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
20 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
92 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 ...
1
vote
1answer
248 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
930 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
123 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
124 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
33 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
56 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
77 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
90 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
88 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
46 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
272 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
143 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 ...
1
vote
1answer
144 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
173 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
2k 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
27 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
33 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
181 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
196 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
381 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
2k 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
22 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
365 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
227 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
233 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
586 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
215 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
75 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
7k views

How to save Crontab edits?

I ran crontab -e and made some changes, now how do I save it?
0
votes
0answers
130 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
611 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
82 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
146 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
486 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
38 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
347 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
54 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 ...