cron is a task scheduler based on clock time that runs on Linux-based machines.

learn more… | top users | synonyms

0
votes
1answer
53 views

How can logrotate execution result in “service: not found”?

I am trying to understand the output of my logrotate script execution: error: error running shared postrotate script for '/var/log/nginx/*.log ' logrotate_script: 2: logrotate_script: service: not ...
4
votes
2answers
4k views

Linux startup script to connect to bluetooth and cron to keep it connected

I have a mini Bluetooth keyboard and a Raspberry Pi running a Debian-based distro. I know the MAC address of the keyboard but for this question, let’s just use AA:BB:CC:DD:EE:FF. Right now I have to ...
0
votes
1answer
28 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
1answer
25 views

how to see the output of a cron/at jobs while it is still running?

The output of a cron or atq job is automatically send by email to the user, when the job is finished. However I am running a time consuming script, and I would like to check that it is running ...
1
vote
1answer
46 views

Anacron fails to open folder cron.daily / cron.weekly

Recently I switched from user-specific anacrontab ( using -t ) to the global-one. Now each day anacron drops me a message (email to root) that it failed to open the cron.daily folder: Subject: ...
3
votes
3answers
21 views

sudo via cron'ed ssh works in RHEL6 but not in RHE7 (/dev/tty: No such device or address)

I give up: I have a cronjob script that Ive been running for years (out of a RHEL 6.7 machine) to remote into other RHEL machines via ssh. Works flawlessly against RHEL5 and 6 but fails against ...
0
votes
0answers
12 views

How to make automatic hourly/daily/weekly snapshots with Btrfs

I remember working at a company with a NetApp server in 2003, and we had a snapshot directory in our home directories, with various snapshots appearing in it. I think there were snapshots for the last ...
1
vote
5answers
7k views

Disable cron jobs for a specific user

I have a list of jobs in the crontabs for user1, user2. I want to prevent the jobs of user2 from running. I tried listing user2 in cron.deny, but that only prevents him from accessing his crontab. ...
0
votes
0answers
18 views

aws linuxAMI crontab ec2 to s3 backup command not working

I am new to Aws Platform and was trying to get Hands on experience on Command Line... but when i was configuring installed wordpress site...and syncing it to S3 bucket.. and for that my instructor was ...
0
votes
0answers
15 views

Cron job appears to work, but no changes seen in file

I have a simple cronjob that uses curl to download a file and save the contents to a file. The crontab file reads: 45 17 * * * /home/my_username/public_html/./update_md.sh where update_sh.md = ...
0
votes
0answers
10 views

Schedule the cPanel Transfer Tool

I'd like to schedule the transfer tool from cPanel, i'd like to do this daily to keep things synced with a failover backup server, identical to the first. I am looking at ...
1
vote
1answer
23 views

Debian - How to get notified when packages for “dist-upgrade” are available?

I automated apt-get update && apt-get upgrade by using the package unattended-upgrades together with anacron. It makes sense that unattended-upgrades does not execute apt-get dist-upgrade, ...
0
votes
2answers
27 views

Problems with Autossh: running from cron vs terminal

I'm trying to setup a reliable reverse tunnel between a server to several client boxes. I'm using autossh to re-establish connections if they drop or go stale but I'm having some problems. THE ...
0
votes
0answers
32 views

cron apparently requires a newline character on its own line at the end of the file

I'm trying to understand why cron is refusing to work with a certain crontab file. The manpage for crontab says: cron requires that each entry in a crontab end in a newline character. If the ...
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
17 views

Cron Job Update

I have two files under /etc/cron.d/ named j1 and j2. I make changes to those files, and in a little file the changes are gone and I don't seem to figure out who/what reverts the changes. Is there a ...
39
votes
8answers
67k views
0
votes
1answer
461 views

How can I make cron to email report audit only if there is something to report?

I setup daily cron job checking if files have changed previous day, since those files are not suppose to changed i'm getting empty report, how can i change it to send email prevent this. this is my ...
1
vote
1answer
110 views

script executing perfectly in terminal but not in cron

I setup a script for to take an mysql db backup everyday on a specific time, so now the cron is running perfectly it executing the script without problem but the problem is db backup file is not ...
0
votes
2answers
16 views

KShell script skips commands when scheduled in cron

I have a Kshell script which executes a java program. /path/to/java -jar jarfile.jar some parameters > log Same line 5 times with different parameters appending output to log file. cat log | mail ...
0
votes
0answers
35 views

Can't open URL on remote display from cli over SSH

So I'm running an office 'dashboard' on a Raspberry Pi (wheezy) in my office. I've set up the pi to kiosk mode that automatically loads up the scrolling graphs page on boot. All day long it loops a ...
0
votes
0answers
40 views

How do you commit changes to an XML file to source control when they are changed by the users of a web app?

An admin web app (closed-source, 3rd party) that we use generates XML files into the Linux server where it is running. These XML files contain application settings for a production application. Only ...
0
votes
1answer
34 views

Can't use /usr/bin/security to retrieve password from keychain via cron

I can't seem to be able to successfully retrieve passwords from keychain using /usr/bin/security when I run it from my users crontab. Works fine in my terminal. I can also see via the cron mail ...
1
vote
2answers
5k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
0
votes
1answer
55 views

Crontab won't execute script

Here's my cron: crontab -l 30 2 * * * /usr/sbin/stime& 32 2 * * * /usr/sbin/rtc -s 30 2 2 * * /usr/sbin/rtc -c 00 5 * * * /path/to/script/backup.sh >/dev/null 2>&1 Here's my script: ...
0
votes
1answer
49 views

How to set cron expression to run first Weekday (MON-FRI) and first Weekend (SAT-SUN) of the month?

I tried for the Weekend (SAT-SUN) cron expression: 0 0 18 ? 1/1 SAT#1,SUN#1 * but it didn't work.
0
votes
1answer
144 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
1answer
14 views

Troubleshooting CRONIC/CRON causing 'No such file' Error

I've got a couple of Cron jobs setup that I have piped through Cronic so that I only get emailed if there is an error. Whenever I run the command in a terminal without Cronic the command executes ...
1
vote
2answers
3k views

Why does root cron job script need 'sudo' to run properly?

I'm running this simple script on my Raspberry Pi to auto update so I can forget about it. It also keeps a log that says whether the update was successful. The script is update.sh: #!/bin/bash echo ...
1
vote
1answer
45 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 ...
4
votes
3answers
10k views

Running Cronjobs as per Local Time rather than Universal Time

On running dpkg-reconfigure tzdata in terminal and i get 2 different time on my machine Local time is now: Wed May 1 11:58:55 IST 2013. Universal Time is now: Wed May 1 06:28:55 UTC 2013. ...
0
votes
1answer
40 views

Why doesn't cronjob execute feh command

I build a cronjob to download a new picture from a source every ten minutes and set it as wallpaper using feh. The file is downloaded but the wallpaper doesn't change. Where is the problem? crontab -e ...
0
votes
1answer
30 views

How do I catch and log all attempts to write to /dev/null?

Essentially I'm trying to catch output any scripts that are currently running and silencing their output. So the question is fairly simple, how do I log any attempts to write to /dev/null?
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 ...
0
votes
1answer
34 views

Backup MySQL, using Screen and Crontab

I'm trying to backup my database's table every day, using mysqldump, screen and crontab. If I run only mysqldump, it dumps correctly, but if I do it trough screen, the output file is blank. Editing ...
0
votes
0answers
19 views

Ensuring Cron Jobs are called from within the Server

Here is the information about my development environment: Windows Server 2012 R2 Standard 64-bit Operating System, x64-based processor Microsoft Visual Studio Professional 2013 .NET Framework 4.0 ...
-1
votes
1answer
71 views

How can I constantly check that a python script is running 24/7 and is not down?

I have a python script which has to run 24/7 on a Linux server. What's a wise way to ensure it's up? They suggested me to use cron and the 2nd another script which checks the 1st one somehow.
4
votes
2answers
13k views

Bad minute in crontab?

I get the following error in my syslog: Oct 17 13:14:03 tracker cron[873]: (*system*) ERROR (Syntax error, this crontab file will be ignored) Oct 17 13:14:03 tracker cron[873]: Error: bad minute; ...
1
vote
1answer
26 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?
2
votes
1answer
241 views

Cron Command for twice a month on Sat @12am

I am wondering if someone can help with the simple but sometimes confusing commands regarding Cron jobs. I would like a cron job to run twice a month on a Saturdat @12am.
0
votes
0answers
41 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
2answers
1k 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 ...
1
vote
1answer
28 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
19 views

understanding excessive DNS traffic to cron.sh

I noticed that my domain cron.sh is receiving more than a million DNS requests a month, exceeding its dyn.com quota. Set up djbdns for it and observe that thousands of hosts around the world want its ...
0
votes
1answer
19 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 ...
22
votes
2answers
17k views

Difference between /etc/crontab and “crontab -e”

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?
1
vote
1answer
185 views

How to mail output of shell script as a cron job

I've created a cron job that runs a shell script. I'd like the shell script to run and capture it's output and have it emailed upon completion. Here's what I have so far, but the mail message body ...
0
votes
2answers
790 views

Why does this bash script give an error on Ubuntu but not OSX

#!/usr/bin/env sh export $NODE_CONFIG_DIR=/Users/full/path/to/script/config cd /Users/full/path/to/script /usr/local/bin/node main The script runs locally on OSX (if I adjust the paths for the local ...
0
votes
2answers
452 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 ...
4
votes
2answers
1k views

How did I wipe out all my cron jobs?

I have accidentally wiped out all my cron jobs. I'm not sure what I have done. I don't remember deleting entries from it by issuing crontab -e. What are the possible ways that the cron jobs can be ...