Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

0
votes
1answer
48 views

Output of cron to file

I have a text file topcommand.txt which has a command as below: * * * * * /usr/bin/top -c | grep 'some process name' >> /home/abcd/topout.txt When I invoke this using crontab ...
3
votes
1answer
24 views

How would you build a cron that empties the mail in all mailboxes?

I am new to Unix here. We have some mailboxes that are taking up an incredible amount of space and I'm trying to figure out a way to delete all mail that has been in the box for 30 days. Most of what ...
3
votes
2answers
70 views

Crontab shell script git pull and forever start

I'm trying to set up a Raspberry Pi to check a repo on startup and then fire up a node script with forever. I got the second part working, but I tried a dozen git commands with no success. Here is ...
0
votes
1answer
32 views

AIDE is taking forever to initialize

I have a server at home that I use as a NAS and some other services. The server has Debian Jessie on it, with 4x 4 TB harddrives in RAID5. I use this server to store all my home data, movies, games, ...
0
votes
0answers
11 views

Is an automating apt-get update+upgrade unreliable or dangerous? [duplicate]

I use currently for updating my system a manual apt update && apt upgrade, usually sometime after my system has started. Unfortunately, sometimes I run that really late or even forget it. I ...
1
vote
0answers
31 views

Program/script to limit cronjob output

Short version: Is there an off-the-shelf program to avoid being pinged repeatedly be frequent cron jobs in periods when they fail? I have a custom implementation but it seems like something someone ...
1
vote
0answers
39 views

Linux password expiring and cron jobs failing

I have jobs running on a server which I access via powerbroker (so don't know the password). However the password of the user account expired recently and the said jobs failed. Due to password ...
0
votes
1answer
50 views

Debian : Cron job not firing

I have a cron-job, which is just a script, clearing directories, which accumulate files over time. Unfortunately, it is not firing. Any idea why. I have created the cron-job using cronmaker.com. How ...
0
votes
1answer
18 views

Storing PHP output issued by crontab

I have a PHP file that is suppose to send one email per day scheduled by crontab. Here is my crontab: 45 23 * * * php /var/www/html/linus/class/runnable/dailyStaffReport.php I noticed that it's not ...
1
vote
2answers
26 views

Whats the difference between adding scripts in the /etc/cron.daily/ or editing in your script in crontab(-e)?

There are multiple options - with cron - to start your script at a specific time, but, is one more secure over the other? My question is simple: Whats the difference between adding scripts in ...
0
votes
0answers
37 views

Junk Material on root crontab

I am investigating unexpected restart issue on my Oracle Unbreakable 6.5 and found some unexpected results on crontab for root users. I know that these are junk entries that my be cause to reboot ...
1
vote
1answer
43 views

CentOs 7 CronTab set JAVA_HOME

With the root user I configured the JAVA_HOME variable for crontab like this: [root@localhost ~]# vim /etc/crontab _______ SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/jdk1.8.0_71/bin ...
0
votes
0answers
13 views

How to stop gnome-schedule from sending mails?

I use gnome-schedule in a permanent running UI session on Debian 7.9 Wheezy/Gnome 3.4.2.1. For each run, I get a mail into the local mailbox of the corresponding user, telling Launching ...
0
votes
1answer
32 views

How to run a shell script using cron and at

I was trying to learn about crontab. I tried to execute shell script using crontab. But I did not get the expected result. When I use crontab, 38 17 * * * bin/sh sh /home/agalya/unix/digiclock.sh I ...
2
votes
1answer
42 views

Crontab: variables in the date/time fields

When to run my scripts that go run reports can vary within the month as the data is not available at a standard time; sometimes on the 8th, sometimes on the 10th, etc. I have many reports to execute ...
0
votes
1answer
47 views

Sudo cron job using arp-scan gives empty output

I made a script called hello.sh and it contains the following: #!/bin/bash printf "$( arp-scan --interface=eth0 --localnet )\n" printf "test\n" after making it executable (chmod o+x) and running ...
0
votes
0answers
17 views

Logging memory issues with Cron

I'm trying to log memory errors/issues using cron, however I'm still unsure how to do this. I'm new to cron, but I entered our system with it already using the tool. We've been having memory issues ...
2
votes
2answers
85 views

How to setup an invisible cron job?

Is there a way to schedule a task using crontab by root user but should not be visible using crontab command i.e, crontab -l either for root user or normal users?
0
votes
2answers
43 views

Allow null password for file transfer from Sunsolaris machine to linux mchine?

I m trying to pull a file from a Solaris server to my Linux server and I did it successfully by using scp.I want to run this below command as a cronjob, How can I save password for this automation ...
1
vote
2answers
38 views

Allow one entry at a time in incron job?

I have a directory to monitor. When it is updated, I run some command via incron. When multiple files are copied in this directory, incron execute multiple commands at the same time. Is there any way ...
0
votes
2answers
54 views

Run this PHP file via Cron Job

Here is the script: <?php //Create back files? define('CREATE_BACKUPS', FALSE); if (!is_dir($argv[1])) { echo "You must enter a valid path such as /home/apresv/public_html or ...
0
votes
1answer
57 views

Bash script not working with crontab

I own a raspberry pi that runs raspbian jessie. I'm using this raspberry with motioneye as a system surveillance. Motioneye records files to a sd card but i want to delete older files in folder ...
0
votes
1answer
256 views

Arch Linux - How to run a cron job?

I am on Arch Linux and I'm trying to make a cron job that fires every minute. So I use: $ crontab -e And add the script in: * * * * * Rscript /srv/shiny-system/cron/CPU.R ~ ~ "/tmp/crontab.8VZ7vq" ...
-2
votes
1answer
28 views

Executing MySql stored proc in Crontab [closed]

I have a MySQL stored proc named "item" and I want Cron to run it for me - in server of course. I'm avoiding using MySQL events to unify all my 'jobs' - backup,etc. Any how this is what I did in my ...
0
votes
1answer
41 views

$PATH variable for CRON in OpenSuse

I have a script written which works perfect on terminal however gives error when called through crontab. It took me a while that the problem is with the cron environment not my script. so I tried ...
2
votes
1answer
40 views

Can I move 0yum-cron from cron.daily to montly?

I installed the yum-cron package, configured too only check for updates and then mail me. But, doing this daily, seems a bit too much. I would like to do this monthly. The file is located in ...
1
vote
1answer
37 views

Cron Job Hourly Except Certain Time Frame on Friday

I want my cron job to run every hour, every day except Friday when I don't want it to run at all between the hours of 2am-9am (but hourly outside of this timeframe). Ideally, I'd like to have this in ...
1
vote
0answers
27 views

Crontab -e @reboot script doesn't start on restart

I add a string to crontab -e @reboot /home/user/start-ethminer.sh > /home/user/start-ethminer.log 2>&1 My /home/user/start-ethminer.sh file has the following content: #!/bin/sh screen -m ...
1
vote
2answers
82 views

Crontab not running a shell script

Using account alex, I created: ~/pocketmine/pocketmine.sh When I manually run this using the same account, alex: cd pocketmine ./pocketmine.sh start It runs fine. I have added this to ...
1
vote
1answer
57 views

script Multiple Commands

I have a PHP script I'm running from Cron. I want to save its output to file, but also want to save the shell output to a different file. Ideally, I'd like to have this in one line. As such, I tried ...
0
votes
1answer
20 views

Setting anacron on mac

I set cron to run script every day using env EDITOR=nano crontab -e where I wrote something like this @daily path/to/sript.script Now I want to use anacron to be sure that script is going to be run ...
0
votes
1answer
39 views

Crontab and screen at reboot

I try to create a cron command that execute a software in a screen during start-up on my Debian. It seems easy by doing this command but it doesn't work (no screen created during start-up): ...
2
votes
1answer
48 views

User cron jobs are not being executed any more (perhaps SELinux)

I have the following output as a user running crontab -l: #Ansible: backup-external chaos */20 * * * * flock --nonblock /home/mu/.cache/backup-external.lock backup-external chaos */20 * * * * ...
0
votes
0answers
183 views

Pg_dump does not work in Cron

I have the command below and run it succesfully: /usr/lib/postgresql/9.1/bin/pg_dump -U dspace --format=c --file=/dspacebkp/dspace_db_$(/bin/date +\%m\%d\%Y)_uncompressed dspace I can see my new ...
2
votes
0answers
64 views

use find command in bash file

I am using this script in my Linux machine to find all files that were modified yesterday: #!/bin/bash find /home/*/domains/*/public_html/ -name "*.php" -mtime -1 | while read line; do echo "$line" ...
5
votes
4answers
1k views

A gzip process regularly runs on my system, how do I figure out what is triggering it?

For a while now, I have had the problem that a gzip process randomly starts on my Kubuntu system, uses up quite a bit of resources and causes my notebook fan to go crazy. The process shows up as gzip ...
-1
votes
2answers
37 views

Script not running! Also how to attach timestamp in mail?

I have the following bash script... #!/bin/bash # Delete JUNK temp folder if [ -d JUNK/FOLDER/PATH ] then rm -rf JUNK/FOLDER/PATH echo "Cleansed JUNK directory successfully!" /usr/bin/mail -s ...
0
votes
2answers
31 views

broken cron job after editing it

I'm having some difficulties on understanding why the following cronjob does not work anymore: 30 3 * * * /path/to/backup_script.sh && tar -czvf ...
1
vote
1answer
30 views

Is it possible to have cron restart itself each day?

The reason I'm asking is under certain conditions I would like to change the email addresses that cron sends email to. For example I have database of who is on vacation so I would like to remove ...
0
votes
2answers
33 views

How to set the path for one cron command

I had programmed a cronjob to restart a service with an apparent memory leak weekly and got an email saying that the killproc command wasn't found. That's in /sbin/killproc and I don't want to ...
0
votes
0answers
40 views

Cronjob python script

I have a python script that parses some html and then writes it to output file. I want that cronjob would execute that python script. When I run this script from command line it works fine (python ...
0
votes
4answers
525 views

crontab not running for Fedora 23

UPDATE 2 This is a documented issue in Fedora 23. I used the workaround listed here https://bugzilla.redhat.com/show_bug.cgi?id=1263328. It looks like it is working. UPDATE I set selinux to ...
-1
votes
2answers
99 views

How to start cron in Linux Mint 17.3

How can I start cron at startup of computer, so I can use a cronjob to automatically make a backup using rsync. I am not well known with how to start programs in Linux. I am using Linux Mint 17.3.
3
votes
2answers
39 views

Control character handling in cron/mailx

I have a cron job which runs a long script producing lots of output. Some of the output is lines delimited by single carriage returns; when run from the command line, these make the successive lines ...
0
votes
1answer
32 views

Deleting a file after X days does not work [duplicate]

Ive tried multiple ways of writing this and im executing the script myself so it isnt the crontab that isnt working. These are examples of what ive tried : find /home/backups -mtime +1 -exec rm {} \; ...
0
votes
1answer
34 views

Need some assistance with anacron in Ubuntu

I've got Ubuntu 14.04 I try to learn about using anacron. And there're 3 things so far that I can't understand. Please explain! WHEN is the anacron command (tast) executed for the FIRST TIME? Let's ...
0
votes
2answers
23 views

which programs benefit the most by cron (for a SOHO user)?

I understand that cron is basically a job scheduler. Apart from doing $sudo apt update which I like/love to run manually as it's uncertain when my bandwidth will be free for running the update, I ...
0
votes
0answers
92 views

Centos7 crontab @reboot sleep not working

I am currently trying to get my server to relaunch a few things on server reboot but they were failing due to screen not yet being loaded (I believe), in an attempt to fix this I added a 3min sleep to ...
1
vote
2answers
79 views

Is it evil to link to a crontab?

I think about doing something like: sudo ln -s ~/myCustomCrontab /var/spool/cron/crontabs/username because I'd like to have all customized files in my home directory. Possible risks I can think of ...
0
votes
1answer
25 views

How to update crontab for a user with a script without duplicating comments

So I've noticed that I've dumped a lot of annoying comments in the top of quite a few crontab files by using crontab -u user -l > /tmp/crontab.user #muck with the file crontab -u user ...