Skip to main content

All Questions

Tagged with
1 vote
1 answer
56 views

Process name as the called executable, not the calling script

Edit: I relalised after posting the below that the machine where this 'worked' had in fact not been restarted and the running processes had been launched using an older scheme of actual aliases (...
ozpac's user avatar
  • 33
1 vote
1 answer
4k views

Run a tmux new session with cron, then run a command

I have in my cron that auto starts a service inside a tmux if it detects that its not running. The rest of my bash script works, but if the tmux session doesn't exist, it throws an error. Which is why ...
Patoshi パトシ's user avatar
1 vote
1 answer
2k views

Why crontab doesn't execute a scheduled bash script?

I have seen a lot of times (1, 2 )this question, but I didn't find the answer, so here I go. I'm running Debian 11, but I guess it works the same for any Debian-like distro. My crontab -e looks like: ....
k.Cyborg's user avatar
  • 527
0 votes
1 answer
661 views

sudo crontab notify-send doesn't work

I have read similar posts here, here, here and here that mentioned some environment variables DISPLAY and DBUS_SESSION_BUS_ADDRESS. Setting them at the top of my user crontab enabled notify-send to ...
ripytide's user avatar
  • 103
1 vote
2 answers
1k views

Bash script working in root but not in crontab

I'm trying to execute a bash script on Linux startup, but it doesn't work. I have tried all of these commands in the crontab: @reboot bash /home/user/mysqlamazon.sh @reboot sh /home/user/mysqlamazon....
Soft Programmer's user avatar
0 votes
1 answer
3k views

Bash or path problem?

System: Mac Big Sur I been working more in the terminal and I thought it would be fun to have a fortune present a different message regularly during login. I know I can just add the fortune command to ...
epsilonv's user avatar
0 votes
2 answers
750 views

I cannot echo job to root's crontab with sudo - shell hangs

I'm currently working on bash script, that will add jobs to root's crontab. I'm trying to achieve it with command: sudo crontab -e -u root | { cat; echo "@reboot /home/$CURRENT_USER/scripts/...
s-kaczmarek's user avatar
0 votes
0 answers
127 views

Copy files from a company share to public dropbox using rsync or find, etc

I am working to get a data transfer service up to which I can copy only newly created files in /h/data/share/(company share) to /g/data/global/ (public dropbox), however the files in /g/data/global ...
David Lashua's user avatar
0 votes
2 answers
541 views

Problem with crontab

My script which starts a process and writes the PID of that process to file. This works as it's supposed to when I execute it from shell: process & echo $! > /home/xxx/PIDs/process.pid But ...
diggidre's user avatar
-1 votes
1 answer
553 views

Does this script run a program once as close as to every 15 seconds and not run two instances at the same time?

In https://unix.stackexchange.com/a/11105/674, Gilles wrote The following crontab line will start some_job every 15 seconds. * * * * * for i in 0 1 2; do some_job & sleep 15; done; some_job ...
Tim's user avatar
  • 106k
0 votes
1 answer
131 views

How to execute a script as soon as the computer is active in a given time range and only once?

I need to run a script between some hours of a given day of week as soon as the machine is turned on. For example: every Monday between 07:00 and 10:00. I know how to handle the time conditions "...
Uncle Ben Ben's user avatar
2 votes
1 answer
4k views

Cron : Why are my cron scripts not running even though cron is running

I have a 4 scripts to transfer database from one server to other for testing purpose. These scripts execute automatically in the night. When I call the scripts manually, I get no error, but without ...
We are Borg's user avatar
1 vote
2 answers
10k views

Cron job isn't writing to log file

I have a shell script that writes the date to a log file when executed. When I run the script manually, the correct output gets written to the file. However, this needs to be automated, and when I run ...
AndG's user avatar
  • 313
0 votes
3 answers
3k views

cron not running bash job

so I have been seeing something really weird and perhaps simple? but not simple enough that I have not been able to figure out. I have written a simple bash script that I am able to run without issues ...
user3311890's user avatar
1 vote
2 answers
244 views

Script working manually but not in cron - not calculating var? [duplicate]

I am making a GFFS backup script for a school assignment but I've encountered some issues with it. It works like this: /etc/backup/backup.sh PERIOD NUMBER I have added the following lines in cron: #...
Poomse8's user avatar
  • 13

15 30 50 per page