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

learn more… | top users | synonyms

0
votes
2answers
21 views

How to use crontab to launch scripts

I have created a script (which I already tested if it works) and I want to use crontab to launch it everytime my pc reboots. I created these script called test.sh just for fun and it's pretty easy: ...
1
vote
1answer
16 views

How to allow multiple users to access to the same crontab in Debian Linux v8.4?

I am trying to create a crontab for a group of users, lets call the group "testGroup". There are 3 users, and I want to give all of them access to the same crontab. I did some research and tried to ...
0
votes
1answer
11 views

Where to save scripts on DD-WRT power-less-safe?

i have saved script into /tmp folder but when router lost power, file was deleted. Is there any safer variant to save? I need to run this script every minute by cron.
0
votes
0answers
15 views

How to fix report timestamps generated by aureport via cron?

I set up two aureport cron jobs the other day: 1 0 * * * /sbin/aureport -ts yesterday 00:00:00 | mailx -r "info@domain.com" -s "[Audit report] Summary" "user@domain.com" 1 0 * * * /sbin/aureport ...
3
votes
2answers
67 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 [ ...
1
vote
2answers
31 views

Cronjob not running script

I've created a script to get my external IP address, check if it's changed and if it has, email it to me letting me know. Here's the script, aptly named ip.sh (server hostname is "odin"): #!/bin/sh ...
0
votes
2answers
42 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
0answers
17 views

How to get statistics of CPU throttling?

My dmesg output says that the CPUs are throttled, because of the temperature. [ 1283.260276] CPU3: Core temperature above threshold, cpu clock throttled (total events = 1) [ 1283.260277] CPU2: Core ...
0
votes
0answers
10 views

Full text, dynamic, RSS feed generator

I am looking for a solution to produce and update regularly full-text RSS feed. The goal is to provide full text feeds from a variety of websites to my canto rss reader. There are several services ...
1
vote
0answers
20 views

How can OS X cron use existing ssh-agent without environment?

I've looked all over these forums, and either haven't found an answer to this, or more frequently, the question is different. Client is OS X El Capitan. I am logged in, and my ssh key (with ...
0
votes
1answer
30 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
0answers
18 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 ...
0
votes
1answer
27 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 ...
0
votes
0answers
26 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
25 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
45 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
51 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
19 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 ...
1
vote
1answer
56 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: ...
0
votes
0answers
43 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
2answers
17 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
1answer
42 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 ...
3
votes
3answers
29 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
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
60 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.
1
vote
1answer
48 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
32 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
0answers
20 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
103 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.
0
votes
1answer
45 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
36 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 ...
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
55 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
30 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
74 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 ...
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
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 ...
1
vote
1answer
260 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
1answer
89 views

Start Google Chrome from cron task

I'm trying to start google-chrome from cron task. Actually, I've a cron task checking every minute my chrome processes. If there is not any process. I want to start it. Here is my cron task: * * * * ...
0
votes
1answer
59 views

Add entry to newly created crontab using shell scripting

I would like to add an entry like */15 * * * * php -f /var/www/cron.php to a newly created crontab using shell scripting in Ubuntu 14.04. The purpose of this is to automatically provision a ...
2
votes
0answers
43 views

Setting up a watchfolder

I want to make a folder that I can put any video file into and have ffmpeg catch it and spit it out as an mp4 and remove the non-mp4 file. I have the following: for f in *.*; do ffmpeg -i input ...
0
votes
2answers
52 views

Cron job string settings to fire 4 times a day in between 5-10

* 5-10 * * * will fire the script between the said timings but how will I control the count? BTW the count and the timings can be anything, means it will be dynamic and not static. Just put up a ...
1
vote
0answers
63 views

Many cron -f processes on unresponsive server

My Debian server had again become unresponsive and needed to be restartet (SSH login impossible, no longer transmitted log data to another server's MySQL Database, no new FTP connections possible, but ...
1
vote
2answers
40 views

What happens if shutdown command kills my unison cron job?

I have an Arch linux box at home that I power off quite frequently (the power supply is noisy and it annoys my girlfriend...!). The box has a number of cron jobs running the unison utility, designed ...
0
votes
1answer
158 views

CRON job on Ubiquity Edge Router to Modify hosts File

I am trying to setup a cron job on my Ubiquity Edge Router that will modify the hosts file once in the morning and once at night on weekdays, to block various websites from 8AM - 7PM M-F. I have ...
0
votes
1answer
39 views

Read last known value in a Excel data table

I'm working on something but can't figure out a formula and wondered if anyone out there has any suggestions? I'm looking for a formula which will tell me the last status of a job. In the example ...