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

learn more… | top users | synonyms (1)

0
votes
0answers
19 views

forever stop not working in shell script [on hold]

I have a server in node.js that I must restart every 1 hour. So I created a server.sh file and put this: forever stopall forever start /var/www/server/server.js I tried this as well forever stop ...
0
votes
1answer
23 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
13 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
24 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
9 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
54 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
42 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
0answers
15 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
18 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
24 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
33 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
56 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
26 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
30 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
26 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
21 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
39 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
179 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
40 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
23 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
29 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
26 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
22 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
44 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
55 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
21 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 ...
0
votes
1answer
37 views

Why doesn't `date +%F_%T` work in crontab? [duplicate]

When I use time and date at the end of a crontab line like backup`date +%F_%T`.sql or like backup`date%d%m%y`.sql, my crontab command doesn't work. But when I remove it, it works perfectly. Why ...
2
votes
1answer
94 views

How to run a script in a screen on reboot

I want to start a blocking server in a screen on reboot, so that I may access it later. The command screen -d -m /home/dataserv/www/start_production_server.sh works on its own just fine regardless ...
0
votes
0answers
31 views

ubuntu Crontab not running properly

I have to run crontab in xvfb display mode forever when the system restarts...below is crontab code.... @reboot nohup Xvfb :1 -screen 0 1024x768x24 & export DISPLAY=":1" @reboot /usr/bin/forever ...
0
votes
1answer
18 views

Linux Mint 17.2 encounters an error, remounts disk in readonly

I already posted the question actually (Linux Mint 17.2 suddenly loses write access to filesystem), but since it occurs rarely I need to ask again with some new info I gathered. I suspect that this ...
0
votes
1answer
29 views

setuid.today date format changed after FreeBSD 10.2 update

My setuid.today has a different date format than setuid.yesterday: setuid.today (German localization?) 3 Dez setuid.yesterday Dec 3 I'm getting emails with the diff reports every day. I guess ...
2
votes
1answer
40 views

Access to user's session D-bus from their cron commands

What is needed to give cron commands access to the session bus (if it is running)? It used to work for me, on Debian Stretch (testing) since switching systemd until relatively recently (might have ...
0
votes
0answers
18 views

dstat not installed with cron

I have an auto install bash script triggered by cron, when some condition is met, the install process is triggered. It essentially looks like this: #!/bin/bash if [[ -f "/usr/bin/apt-get" ]]; then ...
1
vote
3answers
36 views

script not running as expected when scheduled as a cronjob

I'm trying to write a script that will identify corrupt jpg images using imagemagicks identify command. The script will run the command, grep the output for the word "Corrupt", move it to a corrupt ...
1
vote
1answer
74 views

Boot computer on schedule 2 times per weekday [duplicate]

My setup: I use Ubuntu 14.04 to perform a range of tasks. These tasks are performed whenever I execute a bash script. When it has finished the tasks the computer is automatically shut down (I don't ...
0
votes
0answers
57 views

Issues with a cron script

I have a shell script which does following: Do a scan on websites (URLS coming from all_hosts.txt), Get json reponse which is saved in file (outputscanner.txt) Run a json parser (jq) on above file ...
1
vote
1answer
28 views

handle large number of same log using cron or logrotate

We have an app deployed in a server, which, under some scenarios, generates some logs in the below format. process_name.hostname.common_text.log.{error/info/warning}.date.time Now, due to this ...
1
vote
2answers
34 views

Executing a cron 9 to 5 and at midnight

It's simple for the ones who understand it but for me most of the times it's a big puzzle. I want to execute a PHP script 5 minutes after each hour from 9 to 5 and i want to run it once more 5 ...
1
vote
1answer
16 views

Gnome Schedule cannot run hdparm

I have set up a cron job that should execute hdparm -y /dev/sda >> /var/log/diskspindown.log 2>&1 When testing it running it via "Run selected task" it executes fine and logs ...
1
vote
1answer
19 views

Run certain script periodically at boot time

Suppose the computer is being launched irregularly. And I want to run a certain script at boot time once in a month. But I can't setup a cron job as I don't know whether the machine will be booted at ...
-2
votes
1answer
39 views

Jobs not working in cron, but working manually

I have gone through similar posts in this website, but none of them is matching my query. I have the below content in my crontab, but it is not working. * * * * * perl sc.pl And when i'm trying ...
0
votes
0answers
35 views

cron not running rsync

I'm trying to setup a rsync task using cron. The point is to sync a work folder on a linux partition and its counterpart on a windows partition on a dual-boot computer. To do that, I'm trying to ...
1
vote
1answer
18 views

Correct cron format

So I wanted to execute two commands every every week at beginning of Friday 12am and Sunday night 11:59pm before it turns Monday as I want this to be turned on from friday-sunday night then again next ...
1
vote
1answer
18 views

No indication of attempt to run cron job

I am running the latest Sentora version on an Ubuntu 14 server. I created a cronjob which should run every five minutes but there's no indication of an attempt to run the cron job. I have tried to ...
1
vote
1answer
34 views

Run minecraft from script in cronjob

I tried making this command run at 10:20pm and then the second at 10:21pm but nothing works. I tried as root and as minecraft user but nothing. How can I get it to work? 20 10 * * * screen -S classic ...
2
votes
1answer
49 views

Notify-send doesn't work at Cinnamon

I am using Linux Mint 17. I want to be informed every 50 min, at every hour for small break. Here is cron job: nazar@lelyak-desktop ~ $ crontab -l DISPLAY=:0.0 XAUTHORITY=/home/matrix/.Xauthority ...
0
votes
1answer
50 views

crontab doesn't work corectly [duplicate]

I want to make some notification to user every day at the same time: any_hour:50 And I wrote to crontab -e: 50 * * * * DISPLAY=:0 /usr/bin/notify-send -i ...
3
votes
1answer
53 views

How can I get at to work on OSX?

My at on Mac OS X 10.11 seems to be incapable of launching jobs. I tried: echo "date > foo" | at now Running atq afterwards shows the job queued and no file foo was created. To make sure the ...
0
votes
1answer
34 views

Why cron not outputting to file? [duplicate]

I scheduled a cron task: 0 */10 * * * aapa bash /home/aapa/scripts/es_backup.sh &>> /var/log/super/es_backup.log It is running as logged into syslog: Dec 4 08:17:01 dexter CRON[15552]: ...