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

learn more… | top users | synonyms

0
votes
0answers
14 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
26 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
18 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
13 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.
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 [ ...
1
vote
3answers
685 views

cron table mailx caused empty content

I'm using centos 7.0/6.5. The content of /etc/cron.hourly/mail.cron #!/bin/sh log=/var/log/mail.cron.log echo "`hostname` `date`" >> $log 2>&1 mailx -s "test mail" me@example.com < ...
0
votes
0answers
18 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 ...
1
vote
2answers
33 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 ...
1
vote
0answers
24 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
2answers
47 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
19 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
13 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 ...
0
votes
1answer
75 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
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
1answer
28 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
59 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
30 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
20 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
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
55 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
60 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 ...
40
votes
8answers
68k views
0
votes
1answer
485 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
111 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
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
0answers
44 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
41 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
44 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
6k 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
62 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
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
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
4k 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
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 ...
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
46 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
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
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 ...
0
votes
0answers
22 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
108 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; ...