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
12 views

how to identify DISPLAY value of multiple hdmi ports of machine for cronjob

my current cronjob is this DISPLAY=:0 python3 "/home/ubuntu/test.pyc" this cronjob works fine with monitor connected on hdmi port 1 but when I change DISPLAY=:1 then it does not display ...
0
votes
1answer
22 views

can't run python script with crontab and startup application

I have a simple python script that compares date of a file to the current date and prints something on screen. I want to execute this script every time I log in. I try to add the script to the startup ...
0
votes
0answers
24 views

Cronjob putty doesn't go on

I recorded a cronjob : */5 * * * * cd /home/titi/sync-expedition-teliae-magento && /usr/local/bin/docker-compose exec php-apache sh -c "bin/console app:sync-shipment" Unfortunately ...
0
votes
0answers
24 views

How to automaticly start process (non system process)

How to automaticly start process if process was killed or finished? For example I've got process name Test, that process was killed because some problem... I need to automaticly start that process ...
0
votes
2answers
20 views

Check if a cronjob still writes to a log file

I want to define a cronjob like this: @hourly /path/to/my/script.sh &> "/path/to/my/logs/$(date +%Y-%m-%d_%H-%M-%S.txt)" So it should write the output of the script to a log file. ...
0
votes
0answers
20 views

Crontab: complex conditions for the same file

I want to schedule a single script so that it : Runs every week on monday Additionaly runs the first day of the month If both conditions apply (e.g Monday March 1st ), it should only run once. What ...
0
votes
1answer
17 views

Accessing Cronjob Log files on AWS EC2 instance

I would like to start by expressing my appreciation to any help I receive. I am very new to AWS and ubuntu servers. I run a daily python job on my EC2 instance and it fails every Friday for some ...
0
votes
1answer
19 views

Executing a .py on the startup to trigger a GPIO button

I am quite a n00b, and this task is not easy as I thought at a first glance. I am on a raspberryPi4 with Raspberry Pi OS Desktop with recommended software installed (really similar to every ubuntu, ...
1
vote
0answers
23 views

pkill inside the cron script kills next commands

I have a hash.sh file which runs as cron job. Inside the script I need to call pkill to clean some redundant process. But when pkill is called whole script ends up immediately and next commands are ...
0
votes
1answer
33 views

Cron which java -jar does not work

I have a cron job which runs bash.sh file. If I run the file in terminal it works fine. But as I try to run it as cron job something happened there and I cant figure out what. Cron job looks like: */5 ...
0
votes
1answer
33 views

Running jobs at boot-up

I'm new to this whole Linux thing and I was wondering. I know about cron // crontab and I want to run a a job after boot. The jobs I'd like to run are: 1 - apt get update && apt get upgrade -y ...
1
vote
0answers
48 views

Crontab command on Ubuntu 20.10 on Raspberry PI400

My setup is as follows: Raspberry PI: 400 Ubuntu Desktop 20.10 I changed the operating system on my Raspberry PI 400 to Ubuntu as this give me just a little more flexibility. The only thing i can't ...
0
votes
1answer
57 views

Ubuntu 20.04lts, cron -l fails Resource temporarily unavailable

I'm getting this: Cron won't list current jobs, ie sudo cron -l fails. It returns: can't lock /var/run/crond.pid, otherpid may be 468110: Resource temporarily unavailable I've tried the following ...
0
votes
0answers
51 views

Crontab -e Backup all system with Ubuntu

I'm trying to do a crontab -e command to make me able to make Ubuntu do automatic backup of my entire desktop system. How should I be able to do it? Actually I try this on crontab -e 30 22 10,25 0 0 0 ...
0
votes
2answers
70 views

how to check already executed programs in Linux?

I'm running various Cron tasks in my Linux machine. Recently I updated it and want to check if it is working fine. For example: 0 6 * * 1-5 /scripts/foo.sh Except for the case that I check during the ...
0
votes
1answer
30 views

Ubuntu 20.04 VPS randomly restarting with Cron Job

I'm having problems with my VPS. It's randomly restarting, and according to the syslog, it's due to a cron job. I don't have any cron jobs running to reboot the server. It rebooted a bit over a week ...
0
votes
0answers
32 views

Cron won't start virtualbox

Groovy Gorilla echo $DISPLAY :0 I want to start virtualbox from cron and ROOT's crontab entry is: mm hh * * * export DISPLAY=:0; /usr/bin/virtualbox and I am getting this error: Qt WARNING: could not ...
0
votes
1answer
27 views

How can you schedule regular tasks to execute when available?

I want to schedule some tasks on my ubuntu 20.04 destkop to execute regularly. Like backups or downloads from certain sites or whatever. I have been using crontab for this, but if so happens that my ...
0
votes
1answer
43 views

Use crontab to execute php file

I try to put this in crontab : 50 19 * * * /usr/bin/php -f /var/www/html/phpscript.php this PHP script works well with php /var/www/html/phpscript.php... I already follow many tutorials on the web, ...
0
votes
1answer
49 views

Cron doesnt output anything from python script if selenium is run headless

I've got a WEIRD problem, I've been banging my head against this issue for the last 2 weeks, googling around and drinking to wash away the pain of my failures. So here's the deal, when I run my alarm ...
1
vote
1answer
97 views

How to schedule task on Linux Desktop

How to schedule task on Ubuntu Mate 20.04 Desktop, to run bash script.sh once a day on Tu/We/Thu/Fri/Sat, after laptop startup? Note: I can run job once a day by Anacron on laptop starup: /etc/...
0
votes
1answer
27 views

mdadm raid 5 pairity check control / new behaviors in Ubuntu 20.04

It looks like there's been some changes in when mdadm does parity checks and how it is controlled. It used to start the first Sunday of the month at about 1AM and was started by a cron entry. Now it ...
0
votes
1answer
27 views

Cron script to get current date, match the month number with folder number and zip it

I'd like a cron that gets the current month (E.G. 02) and matches it against an existing folder (02) and zips the folder recursively. Currently, I have to update my script to use the new month number.
0
votes
0answers
65 views

Minecraft Server scripts with screen and crontab

Currently I am hosting my own minecraft server for my friends. I have created a "start.sh" and "backup.sh". I would like my start script to run at boot, I would like it to start in ...
0
votes
1answer
24 views

Computer slow down every hour during anacron jobs

I installed Ubuntu 20.04 with Gnone recently on a Latitude E6540. Every hour, the computer is slowing down, and sometimes, completly freezing, and I have to do a hard reboot. The syslog doesn't give ...
0
votes
1answer
39 views

Crontab script writing just NULL to database

I'm starting a script every day with a cronjob: 0 1 * * * /bin/bash /home/performanceRatio.sh Script: #!/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin python3 /...
1
vote
1answer
221 views

kinsing miner fix - help needed

Ineed some help removing this kinsing virus (bitcoin miner). Currently I have this script running every 5 minnutes via a cronjob sudo kill $(pidof kdevtmpfsi) || True sudo kill $(pidof kinsing) || ...
1
vote
2answers
32 views

Cronjob: Deleting the oldest file with at least 50GB while keeping 2 files in the directory

I have a backup script running that creates a ~300GB backup file to a backup folder daily. In that backup folder are some files that are smaller (less than 50GB) as well. Using a cronjob I want to to ...
1
vote
2answers
71 views

Crontab not running script [duplicate]

EDITED: I got a script running with a cronjob every day at 1 am: 0 1 * * * /bin/bash /home/performanceRatio.sh It also appears in the cron.log: Feb 2 01:00:01 inf-education-67 CRON[108963]: (root) ...
0
votes
0answers
29 views

Cron job on reboot not running

I am using Ubuntu 20.04 on my Asus ROG GL503GE (Nvidia drivers, dual boot). I have added @reboot root echo 60 > /sys/class/power_supply/BAT1/charge_control_end_threshold on /etc/crontab, but still ...
1
vote
0answers
25 views

Cron job & logger commands

I have a backup cron job that rsync files between 2 locations. To get some logged output that it has run, the job has this syntax: #!/bin/bash logger "Seafile File System Backup Started" ...
1
vote
1answer
50 views

Drop cache job with certain condition gives error in crontab

I'm trying to apply a cronjob to drop cache that checks for a certain condition every minute and if the condition applies then it executes, also I don't want jobs to overlap if it takes longer than a ...
0
votes
0answers
14 views

bash script updates wallpaper in terminal but not in cron [duplicate]

I have written a script to manipulate my wallpapers. It works fine in the terminal, but not in cron. Upon careful investigation I have found the offending line in the script: gsettings set org.gnome....
0
votes
0answers
15 views

How to launch anbox.appmgr from crontab in AWS

How can I show notify-send messages triggered by crontab? I am following this to launch anbox via crontab in the remote server. It works perfect on the local machine, but when I change the content of ...
0
votes
0answers
31 views

Working cron jobs are not executing with the new year change

In my GCP VM, I've set up some email sending APIs to getting executed at the weekends. In December month these APIs getting executed without any issue but with the new year 2021 these APIs failed to ...
0
votes
1answer
57 views

Command not working in crontab, but work in terminal [closed]

I have command in crontab: 20 * * * * root /usr/bin/find /home/user/temps/ -type f -mmin +20 -delete If I run this command in terminal everything works fine, but in /etc/crontab doesn't work. ...
0
votes
1answer
123 views

Create a wordpress Cron in Ubuntu 20.04

I use this cron job in Linux cpanel */5 * * * * wget -q -O /dev/null "https://myurl.com/wp-admin/admin-ajax.php?action=place_tags" > /dev/null 2>&1 I migrated to google with cloud ...
0
votes
2answers
46 views

Schedule a Task-every 10 minutes: Fetch a URL 'https://site.com/folder/cron.php' fetched Status: 404 Output: File not found

I'm a beginner, I've been looking for solutions on the net, but I haven't succeeded. Fetch a URL: https://site.com/folder/cron.php/ I rented the server recently. OS Ubuntu 18.04.5 LTS , Plesk Obsidian ...
2
votes
1answer
95 views

How to play a sound in the background every 15 minutes?

I have Polk Hampden speakers on my System76 desktop here. The sound is great, but if no sound plays for ~15 minutes, it goes into a power saving mode where no sound plays until there is about 8 ...
0
votes
1answer
19 views

install cron files directly

I am maintaining my (per-user) cron files in git repo and would much prefer to install them in their locations. I understand that cron prefers you edit files manually ( yuck ) with crontab -e. This is ...
0
votes
0answers
16 views

Should I auto run update un ubuntu [duplicate]

a new weeks ago, I had to re-install my system because my OS was out up date. I think I did not take system update seriously and end up loose some of my config. I am asking myself few questions. ...
0
votes
0answers
49 views

How to run pynput and FFMPEG script using CRONTAB?

I need to start three python3 scripts and a shell script using crontab. These scripts should run at the same time without any delay. Each script runs exactly for one minute. For instance, I have ...
0
votes
2answers
47 views

LuckyBackup superuser scheduled backups do not run

I am currently running Ubuntu Studio 20.10 on a Dell desktop PC. I have two different accounts, and would like to use LuckyBackup in superuser mode to run the backups and retain permissions. The ...
1
vote
0answers
81 views

Crontab not working - cronjobs

thank you all in advanced. Getting some issues with raspberry pi b with crontab My sh script is to create a movie in a folder using images inside a specific folder. */5 * * * * sh /bin/script.sh As ...
0
votes
0answers
48 views

How to use Caps Lock as ctrl automatically?

I used to be able to use my caps lock key as a ctrl using Gnome Tweaks but, despite it being set in Tweaks it is not working anymore. For the past 2 months I've had to periodically open up a non-tmux ...
0
votes
2answers
86 views

Shell script not running from cron

Server Ubuntu 16.04 running in a Virtual Box. I had a server which I needed to rebuild (had no backups). I copied all relevant scripts I needed to reuse and all work as expected except one which is ...
0
votes
1answer
41 views

CronJobs not working on video script

I've basically installed ffmpeg on a vps with 20.04 ubuntu I am trying to create a video in /home/ubuntu/video folder - so i am asking script to select all jpeg files in that folder ffmpeg -f image2 -...
1
vote
1answer
80 views

Crontab not Executes my python file but output is not generated…!

cronjob working perfectly but out is not generated, !!! when i run my python script manually it gives output , but in cron job it was not generating output Dec 23 15:10:01 raspberrypi CRON[3265]: (pi) ...
0
votes
1answer
55 views

How to get gnome-screensaver-command info passed along to the script called by CRONTAB

There are two USERS on this computer: jdl and experiment CRONTAB setup (for experiment(executed every minute): USER=experiment HOME=/home/experiment SHELL=/bin/bash PATH=/home/experiment/bin:/home/...
0
votes
0answers
51 views

Unknown CRON job sending email after boot

I have a question about mysterious CRON job which runs aftery every boot and sends me following email: picture (at least 10 reps needed) System: Ubuntu 20.04 I can't locate the cron job that does that ...

1
2 3 4 5
39