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.
2,237 questions
0
votes
2
answers
63
views
Startup script only runs half the commands
I wrote a short script that runs whenever my server restarts, however, the client tmux session is active after the server boots, but the api tmux session is not.
I'm using the following script
#!/bin/...
0
votes
1
answer
55
views
How to run python script in Ubuntu using cron
I need to auto run the python script (having some print statements) in Ubuntu upon every restart. I have typed crontab -e that opens a file in nano. I just have written the following line at the end ...
0
votes
1
answer
67
views
First time cron job not generating (visible) output or errors
Trying to create a cron job to do weekly backups, but I'm creating simple test to make sure the cron job works before I put in the actual commands.
This is what I added to crontab:
*/2 * * * * /etc/...
0
votes
2
answers
212
views
spd-say in bash script does not work when called from crontab but works from terminal
My system is Lubuntu 22.04.5 LTS on a laptop.
Because I would like to keep my battery as healthy as possible, I want to make sure that the charging level stays between certain boundaries, but the ...
0
votes
1
answer
357
views
How to sequentially rsync photos between server and workstation with periodic syncs
I'm a user, not a programmer, and I need help with syncing photos between my devices on Ubuntu.
What I have:
A laptop with limited space where I upload photos from SD cards to a server using SSHFS.
A ...
0
votes
0
answers
57
views
My system hang when running the container and application on ubuntu 22.04
We’ve encountered a system crash issue on one of the hardware units and would appreciate your advice.
Upon reviewing the event logs, the following sequence was noted:
Time Event Details
17:17:01 ...
0
votes
1
answer
202
views
Can't run Minecraft using 'ssh' and 'screen'
I currently have a server running Ubuntu 22.04. I use it via SSH, and I made so it runs my Minecraft server automatically with Cron.
Because cron doesn't open a screen, I want it to open one, so I can ...
0
votes
1
answer
94
views
Replicate Gentoo cron behavior
I'm generally happy with my Ubuntu install on my home server, but there is a feature (specifically about cron) I miss from Gentoo. I would like to know if it is possible to replicate it on Ubuntu. I'...
0
votes
1
answer
166
views
Sudo not found from crontab
I'm writing a crontab where I want a certain script to run every time my machine is rebooted, something like this:
PATH=/root/.nvm/versions/node/v20.16.0/bin
TZ=GMT
@reboot cd /mydirectory && ....
1
vote
1
answer
138
views
Cron job(s) won't start after reboot of the system without login
Operating System: Ubuntu 24.04.2 LTS
Created a Cron job as a test to start a script (sh) file.
* * * * * /usr/local/bin/test.sh
The test.sh file should copy a file from a folder (/home/testuser/...
0
votes
0
answers
93
views
Having trouble installing Sunwait for use in home automation
I've been using Sunwait flawlessly for several years on Ubuntu 18.04 32 bit but since installing Ubuntu 20.04 64 bit I can't make it work. I'm sure it's an installation issue but I'm a user, not a ...
0
votes
0
answers
83
views
How to write a script to run a job on crontab every 5 hours?
I have a Python script I want to run every lets say 5 hours with crontab. The way I do it manually is:
cd /path/to/script >python3 script.py
After that I must pick between a few option, lets say 1-...
0
votes
0
answers
151
views
Script not running on sudo cronjob
I have a script I'm trying to run on restart. This is in Ubuntu 24.04 (VM in Proxmox). I can manually execute the script without any issue.
I have set it up via sudo crontab -e with this basic ...
1
vote
2
answers
2k
views
What would be a "cron" alternative?
I'm reading that using cron for scheduled and repeated tasks could be a safety risk. Moreover, some other systems are deprecating it...
Now, in the minimized server version of UBUNTU 24.04.1 LTS, it ...
0
votes
0
answers
263
views
Crontab with proxy
I have an issue :
I add inside /etc/profile.d/proxy :
export http_proxy=http://IP:80/
export https_proxy=http://IP:80/
export ftp_proxy=http://IP:80/
export no_proxy="localhost,127.0.0.1,...