Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cron]

Cron is used to execute scheduled commands. It acts as a task scheduler on Linux and UNIX systems which will execute commands at specified times set by the user. Cron has a great deal of customization and is often used on server environments where common tasks are run on a regular basis.

0
votes
0answers
9 views

Lock in registry value

How can I lock in the registry value true for org.gtk.Settings.FileChooser.show-hidden? The value is automatically modified to false on specific actions. If I cannot lock in the value, how can I ...
0
votes
0answers
27 views

Cron not running on webmin

I have scheduled a cron on webmin as shown in the screenshot, but it is not being executed. (Click image to enlarge)
0
votes
1answer
45 views

Having trouble getting .sh working with crontab

I've checked this link for suggestions but I can't seem to get a .sh script working. I'm new to Ubuntu and Linux (from Windows). Why crontab scripts are not working? Here is the dummy .sh I'm ...
0
votes
0answers
11 views

Ubuntu 16.04 - create a cron job that runs just before logrotate

I want to upload my apache logs to a remote FTP server, wich i have allready managed to figure out how to do. However. I could inject the code in the logrotate cron job, but i am worried it would ...
0
votes
0answers
21 views

strange cron job keep running in my ubuntu 16.04

as u can see, the cron job run as root every minute and output something to /dev/null. it didn't happen in other machine, i guess i have been hacked? however, this is suppose a internal used machine, ...
0
votes
0answers
32 views

18.04 - Cronjob Not Working on Reboot

I have recently added the following commands to the crontab : @reboot macchanger -r eth0 @reboot macchanger -r wlan0 This worked perfectly and I used it this way for a couple weeks, then I added a ...
0
votes
0answers
29 views

Cron can't seem to run python script

I have a python script that does a bunch of stuff. I need cron to run that script, but it doesn't seem to work. Here's my cron job: * * * * * /home/deploy/bin/monitor Here's that script that handles ...
0
votes
1answer
13 views

Manually change cron file without crontab -e

I'm developing a web page to change cron programmatically. My problem was that I can't change cron jobs because /var/spool/cron/crontabs/root needs crontab -e to install the cron job. I give you the ...
0
votes
0answers
21 views

Cron Task stops at same time every day?

I have a bash script which runs, reliably, every 15 minutes until 08:30 each day. No errors are generated by the task itself which leads me to believe there may be something else causing cron tasks to ...
1
vote
0answers
15 views

Crontab with external values

i been trying to make a script,that generates a programmed backup using external values to fill the crontab line. so i been using : read -p " text " var for every variable for the crontab to get ...
1
vote
1answer
22 views

Cronjob - Unable to find module “pydub”

I have a python script which run perfectly in my Ubuntu 16.04 GCP. as per the project requirement i have to run this script with crontab (crontab with sudo user) but when cronjob executed it unable ...
0
votes
0answers
30 views

rc.local is not run when I reboot with crontab [closed]

I'm able to reboot my system from crontab with following command: /sbin/shutdown -r now or with a script containing only the reboot command. These options both work fine, but when the system comes ...
0
votes
0answers
13 views

same cron running twice on ec2(ubuntu)

Is it possible that 2 versions of same shell file are running on a crontab of a system? I had set a crontab on Amazon EC2 instance which was like 00 11 * * * "path_of_shell_file". Once the cron ...
0
votes
1answer
54 views

How can I use cron to edit a line in a file?

I'm using Ubuntu terminal and I want to tell this to my crontab; Go to test.cfg file, open it, replace line 35 with x. Is this possible? I have looked around but couldn't find anything.
3
votes
1answer
232 views

will cron.hourly prevent my ubuntu pc from sleeping if my suspend setting is for 1 hour?

I have set my 'suspend when inactive for' to 1 hour. It seems to me that because cron.hourly runs every hour, the pc will never go into suspend mode. Is this correct?
1
vote
2answers
43 views

cronjobs under ubuntu php not working [duplicate]

I am trying to set up cronjobs to excecute some emailing to clients periodically but I am seeing no output fromm the test I wrote here is the crontab line * * * * * php /var/www/html/pms/notices/...
0
votes
1answer
79 views

Ubuntu 16.04 time stops syncing timedatectl fails to query server, but timesyncd is active

Original Question: See updates below. I'm hoping I can get some assistance working through an issue I've been having on my Ubuntu server. I'm running the desktop version of 16.04 as a server and ...
0
votes
0answers
15 views

Run a process after the machine is booting? [duplicate]

I have a Unix machine where I have a process located in /etc/init.d/ and I would like to run this process immediately after booting my machine... I know that there are at least one way to accomplish ...
0
votes
0answers
71 views

pam_unix(cron:session): session opened for user root by (uid=0

i install cronjob with this command and set my cronjob line on this file apt-get install cron /var/spool/cron/crontabs/root but i have error and dont run os: ubuntu 16.0.4 PHP 7.2 Apache 2 cron[...
0
votes
3answers
70 views

cronjob on ubuntu: (CRON) INFO (pidfile fd = 3)

my os is ubuntu: 16.0.4 PHP 7.2 Apache 2 i install cronjob on this os error: cron[30673]: (CRON) INFO (pidfile fd = 3) cron[30673]: (root) INSECURE MODE (mode 0600 expected) (crontabs/root) cron[...
1
vote
2answers
27 views

Using 'at' command for timed video recording the next day and do it only once

I'm trying to 1) start and stream video to vlc and 2) record the same video stream to a file that starts at 05:45 am the next day everything works but the start time, instead of starting at 05:45 am ...
-1
votes
1answer
53 views

How to add and modify CRON jobs [duplicate]

This is intentionally a duplicate of the following question (because the answers there are not completely correct, and as a new user I somehow cannot comment there): Editing crontab ADDED NOTE: The "...
0
votes
0answers
24 views

Bash script run with sudo privilege (within crontab and incrontab) [duplicate]

I have one non system login user (user was created at the time of system installation) and then I have a bunch of scripts which are mainly doing the task of moving incoming files within some other FTP ...
-1
votes
2answers
35 views

Cron job,crontab

I need help. I must to do next: make cron job for root and save the packets in /var/log on home directory for test user every 2 hours with date stamp,and that file must have user and group for test ...
2
votes
1answer
68 views

Editing crontab [duplicate]

I would like to automate some services using cron jobs. When I try to edit the crontab file at /etc/crontab, I am not able to save it as it says that it is read only. What can I do?
0
votes
1answer
69 views

Make cron run APT commands every 24hrs

I wrote a simple script that is basically apt-get update, upgrade, autoremove and autoclean, like this: apt-get check && apt-get update && apt-get upgrade && apt-get ...
0
votes
1answer
49 views

Install Incrontab ( file system watcher ) on Ubuntu 18.04.1 LTS [duplicate]

can someone please help me to install Incrond on my Ubuntu server, I tried all possible way as I found on the web but nothing works. sudo apt-get install incron Reading package lists... Done ...
1
vote
0answers
19 views

restarting a systemd user service from within cron

I have a user test. test has a systemd user service, located at /home/test/.config/systemd/user/testserv.service The service file contains, [Unit] Description=Test Service After=network.target [...
0
votes
1answer
24 views

How to automatically flush cron on VPS running Ubuntu?

One of my clients has a Magento website hosted on a VPS running Ubuntu. They were complaining that they weren't getting any copies of sales emails - and after investigating lots of other things, I ...
0
votes
0answers
31 views

Error starting vmware with vmrun

I installed Ubuntu 18 server on a barebones and then installed VMware workstation. I created my VM and further wanted to start my VM after booting. I ran the command vmrun start /home/k/vmware/...
0
votes
0answers
36 views

Editing root crontab with startup script on fresh installed ubuntu server

I'm building a script for my ubuntu server. the script creates a lot of files which works just fine, but now i come to a part where i need to add a line to the crontab of the root user. If I do it ...
1
vote
0answers
30 views

why are elements of script not run by cron?

Ubuntu 18.04.1 I have a series of scripts, written to back up files from locations on my PC to locations on my network storage. None of the commands appear to require sudo (I can run them all as a ...
0
votes
0answers
26 views

How can I send an email with hardware info when my PC boots?

I have a script called script.sh that creates a .txt file with hardware info. The script looks like this: #!/bin/bash echo "Sending Email With Attachment"; sudo lshw > /home/ondrej/hardware....
0
votes
1answer
39 views

'find', 'chattr', the command on the terminal works fine. But the command in crontab is not good

I am using the 'a' directory as the 'samba' directory, I made it freely, not to be deleted 10 minutes after it was made. 'find', 'chattr', the command on the terminal works fine ~$ sudo find /home/...
1
vote
1answer
41 views

Crontab is not running

I can not figure why this is not running. I used crontab -e for it's creation. It is owned by me, but the directory it is in is owned by root. It is located in /var/spool/ There are no cron ...
0
votes
0answers
42 views

Crontab vs Certbot renew

I don't get it. I am not getting the crontab for letsencrypt to work. Every 3 months another try and I need to do it again "by hand". I have the crontab: 45 20 * * * /usr/bin/certbot renew >> /...
0
votes
0answers
43 views

Cron job executing twice at one time

I have set my cron job to be executed every 15 minutes. my cron job is */15 * * * * /usr/bin/python3.6 /home/ubuntu/main.py >> /tmp/file Above job will execute every 15 minutes and send the ...
0
votes
3answers
66 views

how to write into cronjob from a shell script

I would like to automate cronjob (meaning schedule a job to be done from a shell script). So i have script that does this #!/bin/ksh timestamp=$(date +%H%M%S) if [ "$timestamp" -eq 230000 ]; then ...
0
votes
0answers
15 views

How to force CRON jobs to use chosen PHP verion

I'm using Ubuntu 16.04 with Vestacp and few days ago I installed and using PHP 7.2 by following this tutorial. Now my server has 2 different PHP version (7.0 and 7.2). I have enabled PHP 7.2, however ...
2
votes
2answers
44 views

change gtk theme on schedule with cron ubuntu 18.04 [duplicate]

Good day ... working as a developer made me change my theme regularly, day and night, i have 2 themes "Light & Dark". i made a bash script to change the gtk-theme and shell-theme from cli, it ...
0
votes
1answer
81 views

How to use RCLONE with CRON

I have a script in a USER folder that works successfully when run manually. But I cannot get it to work when run via USER CRON (edited via crontab -e). There are web posts elsewhere by others who ...
0
votes
3answers
94 views

Run a Bash script to set up iptables at startup [duplicate]

I'm using Ubuntu 16.04 Server. I want to use a Bash script for iptables at startup, but I dont wanna use crontab or init.d. Is there any possible way to achieve this without them? #!/bin/bash IPT="/...
1
vote
1answer
57 views

How to write to crontab using here document syntax << >>? [duplicate]

I'm trying to add a cron job without actually opening vim or nano. Something like this: $ crontab -e << echo '* 0/10 * * * some command' I'm seeing stuff online like this and this, but ...
0
votes
0answers
18 views

How to see the output of a crontab [duplicate]

I'm learning scripting and I've a script which shows an output of a local variable declared inside the script. I've assigned the crontab to run after every two minutes but I don't know where can I see ...
0
votes
1answer
37 views

crontab edit produces a number and does not open the editor in ubuntu 16.04 server

I want to add a crontab entry. When I run the command crontab -e I just get a number as output! How to fix this issue?
0
votes
0answers
25 views

Copy file to google disk though the cron

I am trying to make cron job that make db backup and save it to the Google disk. So I created the folder sqlbackup directly in / and add the following command in the cron (sudo nano /etc/crontab): ...
4
votes
0answers
58 views

How to run update-apt-xapian-index only one time at week?

I cannot understand why update-apt-xapian-index is starting every day I boot Kubuntu 18.04.1 LTS. I have disabled updates in Muon but without any change. After that I searched for it in /etc/cron.* ...
0
votes
0answers
18 views

How to run start a GUI from crontab on Ubuntu 18? [duplicate]

I run Unity desktop with Ubuntu 18 In my crontab (root) I put * * * * * export DISPLAY=:0 && gedit Gedit NEVER start How can I start a GUI from crontab ? I tried with different values for ...
0
votes
1answer
35 views

Anacron exit status 128

I want to make a git commit every week, therefore i wanted to use anacron. So I added the following line to my /etc/anacrontab 7 1 AGDienste.weekly /bin/sh /home/bjoern/Hockey/...
1
vote
0answers
37 views

Slow performance of find

I have a process that creates many nested directories and files in output directory. Right now the directory has 67,000 files which does not sound much. I have a cleanup cron job setup exactly like ...