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

learn more… | top users | synonyms

0
votes
1answer
19 views

logrotate files older than x hours

What's wrong with this rotate.conf? Goal is to delete only files older than four hours path/to/tokens/*.tkn { nosharedscripts prerotate if test `stat --format=%Y $1` -le $(( `date +%s`...
0
votes
0answers
10 views

grab file every x min, and save with continuous number

I have a ip camera which saves pics to my rasperry pi's ftp, than the pi uses imagemagick to overlay some text and saves it as webcam.jpg this happens every x minutes via cron now i want to grab the ...
0
votes
0answers
8 views

somehow after rtcwake command runs, the system time seems to change

I use fedora 21 for home server, and I installed rtcwake command with cron to save electricity to put it to sleep most of the time. For about a week, it seemed to work fine waking up after ...
0
votes
0answers
32 views

I have an issue with the cron

I have this script : #!/bin/bash if [ ! -e /home/mam/restart.lock ]; then touch /home/mam/restart.lock killall arma3server /home/mam/arma3server & fi I made a cron like that : * * ...
0
votes
0answers
33 views

Detect failing USB hard drive automatically

I Have a Raspberry Pi which has one USB external hard drive attached to it (via a separatly powered USB hub). The thing is that sometimes this disk becomes unresponsive (I can't access its mounted ...
1
vote
2answers
24 views

unexpected EOF while looking for matching `"' for cron job

I am fighting with a cronjob which does not work. Everytime when it is executed it get an error-mail saying /bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: ...
0
votes
0answers
3 views

Install cronjob from file to a specific user

I have an install script that sets up a user. Using the install script, I want to apply a cronjob that gets executed by that user (myuser): 0 4 * * * /home/myuser/script-to-run-at-4am.sh I have ...
0
votes
0answers
32 views

Schedule on crontab to reboot router

I would like your much aprreciated help. I have a ISP router (gateway) that doesen't have a schedule reboot on the web interface. I have a raspbian and I would like to schedule on crontab to reboot ...
0
votes
0answers
9 views

Making fcron run all jobs in a manually given time range?

How do I tell fcron, to run all jobs scheduled for a time range that I’d give as a parameter. My PC might be off in the scheduled time, e.g. because I slept at an unusual time. And I can’t run them ...
1
vote
1answer
36 views

How to find the user who is running rsync?

In Linux, if rsync is already running, how can we identify which user is running it? And what if it is running as cron job, will the cron job user be different?
0
votes
1answer
44 views

php script runs from the browser but not from cron job

I am using Centos 7 as my webserver. When I run script.php from the browser, it works fine and processes all the data in the MySQL table. When I run it using a cron job, it runs forever but will not ...
0
votes
2answers
48 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
36 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
21 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
27 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
99 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
52 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
108 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 ...
1
vote
0answers
45 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
30 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
37 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
33 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
46 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
37 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
52 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
18 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
16 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 https://documentation.cpanel....
1
vote
1answer
36 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
104 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 SERVER:...
0
votes
0answers
132 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
17 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
24 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
87 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
56 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
20 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
83 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
56 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
61 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
81 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
57 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
26 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
149 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
61 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
37 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
51 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
96 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
44 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
127 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 ...