I know there are many linux experts here, I wish to get little help with at
command in Ubuntu.
I have been troubled by at
command in ubuntu (18.04 and 20.04) for quite a while, but I don't know where I made a mistake. I've tried at
on three of my Ubuntu systems and it doesn't work on any of them. at
is very handle and nice job scheduler, I really want to get it to work so that I do not have to manually launch programs in the late night on a shared Ubuntu server. I read many tutorials on at
command, here is a very good one.
at now + 1 minutes -f ~/myscript.sh
, it looks really great and can save me lots of energy. Unfortunately, when myscript.sh
is extremely simple,then at now + 1 minutes -f ~/myscript.sh
can run smoothly and I get what I expected. Here is everything I have in myscript.sh
:
echo $(date) > ~/Desktop/time.txt
On top of that, it never worked for me. For example when I change myscript.sh
to
echo $(date) > ~/Desktop/time.txt
pycharm.sh
Basically what myscript.sh
does it is noting down the time and to open Pycharm IDE. I can run sh myscript.sh
without at
, it wroks very well. However, when I run at at now + 1 minutes -f ~/myscript.sh
, the time is noted down but Pycharm was not never opened (I can see the process in htop
if Pycharm is open). Also at now + 1 minutes -f ~/script.sh
does not work with any of my other shell scripts.
Could you please help me understand where I have done wrong and how to make it work. Thank you very much.