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
-1
votes
0answers
16 views

Ubuntu 16.0.4 - How to create a cron job to run a php file every 24 hours [duplicate]

How can I create a cron job to run a PHP file every 24 hours in Ubuntu 16.0.4.
0
votes
0answers
42 views

Ubuntu Server 20.04 LTS: autosuspend “cannot check the systems suspend ability”

I'm quite new to Linux, so please be kind ;) My project at the moment is a Nextcloud-Server running on a Ubuntu 20.04 LTS Server. It is only for personal use for me and my SO ...so it doesn't need to ...
0
votes
1answer
40 views

Cron unable to execute a command

I have a script which should run scoutsuite for AWS audit weekly. I am trying to execute the script from cron. Scoutsuite after running create a folder and saves all the results to a directory "...
0
votes
1answer
26 views

cronjob won't save after reboot

I've created a simple script that pings a server, and reboots my machine if the server doesn't respond. if it does respond, it just exits the script. I've added the script to cron via crontab -e, ...
0
votes
0answers
25 views

How can I start a cron job to pause vlc at certain times

I would like to know how I can use bash to pause vlc at certain times on ubuntu 20.04 running native.I imagine cron but can't get it started and I don't really know any text editors ?
0
votes
2answers
41 views

Script to produce folder

I have recently moved server from Ubuntu 14.04.1 to 18.04, gradually moving data and scripts etc. I have a script to, each morning, make a folder in the form of a date eg 20201017 for 17th October ...
0
votes
0answers
30 views

Does crontab wait until a process is done to start a new one?

I have a script I'd like to run every minute, but the process takes a few minutes to finish, so I'd like the script to beginning running again as a new process while the other process continues. In ...
0
votes
0answers
25 views

Django crontab is not running, even i setup everything

I am using crontab in django and my OS is ubuntu def my_scheduled_job(): print("1") This is code in settings.py CRONJOBS = [ ('*/1 * * * *', 'stocks.cron.my_scheduled_job') ] If I ...
0
votes
0answers
11 views

cron.daily not running [migrated]

I've seen similar questions, but none of the solutions provided worked. I'm on Debian 10. Here's the file list: me:~# ls -la /etc/cron.daily total 52 drwxr-xr-x 2 root root 4096 Sep 7 16:59 . drwxr-...
0
votes
0answers
34 views

Crontabs / Cron Jobs Not Able to Edit or Create File

I try to edit the crontab file to create conjobs by using ssh sudo crontab -e and crontab -e, but I keep getting the following error message (or as shown in the image below): no crontab for root - ...
0
votes
1answer
19 views

Cron job running cmd when it should not

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS" Cron tab line: 38 13 15-21 * 2 /usr/bin/wall "3rd Tuesday of the month?" ...
1
vote
0answers
13 views

Cron job with rtcwake is running twice

I am very new to Linux world, so please excuse if I am saying / asking anything stupid... I am using my old Ubuntu laptop to run a server and I am trying to suspend the system at night for 8 hrs, so ...
1
vote
0answers
33 views

Automatic date-based deletion of old mails in mutt from a cron / shell script

I would like to automatically delete all mails older 22 days using mutt So i have created a shell script - which works when started manually: #!/bin/bash # define mail environment variable to make ...
0
votes
0answers
16 views

set crontab in ubuntu for helm upgrade

I want to using crontab to auto run file.sh for helm in kubernetes, but when file.sh run , this still have log but helm command not run , is anyone using can help me, thanks you this is my crontab set:...
0
votes
1answer
34 views

Cron is running & executing jobs, but won't output to a .log file

I realise that there are plenty of cron questions on the site and I've spent the last hour searching for a solution but haven't been able to find one. Essentially the cron job does execute, but it ...
9
votes
1answer
431 views

How can I upgrade cron in Ubuntu bionic if vulnerability CVE-2017-9525 is not patched?

The vulnerability CVE-2017-9525 exist in cron package in Ubnuntu Bionic, https://people.canonical.com/~ubuntu-security/cve/pkg/cron.html We want to fix it in our server, however there are no patches ...
0
votes
0answers
25 views

Duplicity SSH error only when run by Cron

I have Duplicity running on my Ubuntu desktop. It runs properly if I run it from the command line, however, when I schedule it with Cron, I get this error: backendException: ssh connection to userid@...
0
votes
3answers
64 views

Cron job that outputs “hello world” every minute to the terminal

This is my first time playing with cron jobs and I can't figure out what's wrong. I've read the three most upvoted questions on this but it still won't work. sayhello.sh, which has been made ...
0
votes
0answers
18 views

capture process ID of nohup in crontab

How can I capture and store the process ID of a nohup command that run in crontab? this is my cron 35 * * * * cd /home/ubuntu/aws/&&nohup python3 upload_s3.py >> output_upload_occ.txt ...
0
votes
1answer
104 views

Confusing behavior when running script from cron

I have a simple script. Here's the code: #/bin/bash saveLoc="/root/test"; dt=$(date '+%d-%m-%Y-%H:%M:%S'); scrot_name_fmt="${dt}.jpeg"; streamer_name_fmt="${dt}.jpeg"; #...
0
votes
0answers
33 views

Why is my Windows / WSL using “Very high” power usage for `cron` and `supervisor` services?

I have Windows 10 with Ubuntu 20.04.1 LTS in WSL. I have a Laravel app running via WAMP. If I run sudo service cron start, Windows Task Manager shows "Very high" for "Power usage" ...
0
votes
1answer
82 views

Problems posting notifications from bash script started from cron (KDE)

I am using Kubuntu 20.04 Focal (KDE Plasma v5.18.5, KDE Frameworks v5.68.0, Qt v5.12.8) and I have a bunch of Bash scripts that are expected to post some notifications, to the user and this is the ...
0
votes
0answers
94 views

Cronjob not working no matter what

I have installed Ubuntu 20.04.1 LTS for Raspberry Pi 64bit on a Raspberry Pi 4. I have set a cronjob with sudo crontab e from my regular user (which actually will set contents to root's crontab), the ...
1
vote
0answers
12 views

Why is output from gsettings list-recursively slightly different when run from cron

I have run gsettings list-recursively locally from the terminal while logged into X11 on Ubuntu 20.04. Then I also configured a user-based cron job to run gsettings list-recursively from the cron and ...
0
votes
1answer
55 views

Command running on terminal but not on crontab

I'm trying to run the following commands on a crontab but for some reason I don't know it doesn't. However, it runs when I run it on the terminal. IFS= read -r -d $'\0' line < <(find /path/to/...
2
votes
1answer
78 views

Setting up an Email alert on “crontab” for SOME tasks

I am using crontab to run tasks automatically on my Ubuntu headless server (php, sh, python files). I like to keep track of the error logs to see if something went wrong during the execution. I set up ...
0
votes
0answers
12 views

Are gpg and pass tools appropriate for session-less use in daemons and cron jobs or are there better ways?

I would like to store some credentials that are being used by some custom cron services and systemd daemons. Currently, I found pass tool that relies on gpg, but from descriptions and tutorials they ...
0
votes
1answer
43 views

Bash script works when called by run-parts, fails as cron job with exit code 1

The following script sits in cron.daily and succeeds when called with run-parts but exits with code 1 when called with anacron -f on Ubuntu 20.04 LTS. I have had many problems with various versions of ...
0
votes
1answer
29 views

Mini webradio: doesn't play automatically

The setup is quite simple: a Raspberry, an ethernet cable and two old PC speakers; all of that is in my bedroom. The idea is to have a headless system that plays a music stream from a single "...
1
vote
0answers
24 views

journalctl missing cron entries that show up in syslog

I have cron set up to log start (CMD) and end (END) of all cron jobs along with the process number (setting up cron to use -L 11 option). All entries are showing up in /var/log/syslog, such as: Aug 26 ...
0
votes
2answers
53 views

Does ubuntu ever clear ~/.cache automatically?

I was wondering whether by default there's anything in place that clears the .cache folder. To my understanding .cache is similar to /tmp, at least I am seeing it being used like that. Meaning that ...
0
votes
0answers
23 views

Trouble creating system account and running a cron job under it

I have Ubuntu 20.04 LTS server installed on a raspberry pi 4 (no desktop) and I am trying to create a system account and have a script run under the system account when the system boots (the solution ...
0
votes
0answers
102 views

The service “spamd” appears to be down

I keep recieving emails from my Cpanel host with this content The service “spamd” appears to be down. Server server.domain.com Primary IP Address ********** Service Name spamd Service Status ...
1
vote
1answer
94 views

how to chmod a dir from root's crontab

Root's crontab -e has the lines @reboot mkdir -p /tmp/vimbackups @reboot chmod 777 /tmp/vimbackups @reboot anotherCommand After boot, the directory has been made, but it still has the default 755 ...
0
votes
0answers
22 views

Long mysqldump process with cron not finishing

I have a large database to backup with cron and mysqldump. It is over 50 GB and getting bigger. I noticed in the last few days it is not working properly. When I run the script from terminal it works, ...
1
vote
1answer
23 views

incrontab is not triggering with end of cron sh invokes

I have this incrontab, which is monitoring the master Directory to check if the event occurs where a new file is placed here ... and run the php file. /var/www/html/docs/int/master IN_MOVE php /var/...
1
vote
0answers
17 views

How to Launch anbox.appmgr via crontab [duplicate]

I'm able to launch anbox.appmgr from a SSH session using: DISPLAY=:0 /snap/bin/anbox.appmgr. I'm also able to launch anbox.appmgr from a sh script: #!/bin/bash if ! pidof org.anbox.appmgr >/dev/...
0
votes
2answers
40 views

Automated Driver Loading: Cron, Init, or Modprobe

Main Problem I am attempting to automate the loading of drivers for my system. The drivers were built manually and must be loaded manually. Another caveat is that one of the system drivers must be ...
0
votes
1answer
109 views

Using dbus-send in Cron [duplicate]

I want to setup a cron job to lock my session every day at three PM. When I enter dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock in a ...
0
votes
1answer
201 views

Crontab + random wallpaper issue

I am trying to set up crontab to run a script that will pick a random image from a folder and set it as my wallpaper in the morning, and another script that will do the same thing at night. Goal is to ...
0
votes
0answers
31 views

CRONTAB - Send mail on restart

I am trying to send an email when starting my machine with crontab. @reboot (cd /home/untitle/lab/php/initmail/ && ./initmail) @reboot mkdir /home/untitle/testcrontab With this configuration, ...
0
votes
0answers
34 views

How to run software with system start

I have a problem to set run software with system start. I have ubuntu 20.04. I tried to insert these lines to etc/rc.local #!/bin/bash /usr/bin/clamonacc it doesn't work. Second try was to insert it ...
0
votes
2answers
138 views

Scheduling boot using cron (Ubuntu Server 20.04)

I wonder if it is possible to schedule a machine to boot up at a determined time using cron. Imagine I want my server to shut down at night and boot back up in the morning. I've rad many docs and ...
1
vote
1answer
132 views

crontab reboot command doesnt work

I tried using crontab to upgrade packages every time I reboot @reboot cd /home/toor && (echo "$password" | sudo -S apt-get upgrade) but when I check sudo apt update after a few ...
-1
votes
1answer
87 views

cron does not working for my python program

I face to problem of my CRON job does not working at all. Currently I am trying to run my Python program with CRON on Ubuntu 16.04(Friendly core xential). I typed crontab -e in terminal and added line ...
1
vote
0answers
32 views

Server is getting slowed down by a script

I have a big problem: I'm getting a mail every minute and it is making my server very slow. I get a message in /var/mail/root. How can I delete this? I get this message every minute: Subject: Cron <...
0
votes
1answer
80 views

Do I need to call Python in a cron job script?

I'm trying to run a cron job from a home server that runs Ubuntu 24/7, using a Python script to clear a remote mailbox. In a folder "scripts" in my home folder, I've put in a Python script, ...
0
votes
0answers
29 views

Automatically Delete Specific Log File at Reboot.(ubuntu 16.04)

I have Ubuntu server 16.04, and I have configured tracker software in server. While rebooting the server this tracker delete old log file and create new log(log file extension is same but name will be ...
0
votes
0answers
56 views

Can't save output of particular command in particular environment (cron)

My crontab is not producing logs for a particular command I'm using to monitor my network; other commands work fine. * * * * * /usr/bin/COMMAND opt1 opt2 >> /home/pi/LOG.log 2>&1 The ...
0
votes
0answers
38 views

python versions in /usr/bin/<python> confusion when running cronjobs

I am trying to launch python scripts as cronjobs on ubuntu18.04. The command works fine when running it in terminal as suggested by many posts: /usr/bin/python3.7 /home/jc/scripts/my_Script.py >>...

1
2 3 4 5
38