1

Kindly refer to my problem at: crontab @reboot starting an UI Application

I tried to use sleep in my script. It won't work.

May I know how can I wait for X to start before running my crontab?

Many thanks in advance.

2
  • This is an XY problem You have decided crontab is the solution to your unstated problem, and want us to debug it.
    – Milliways
    May 1 '18 at 5:01
  • You asked for crontab but that isn't the solution for your problem. Raspbian comes with systemd. As @Gerard H. Pille already stated in his comment you should make a service to start with systemd, maybe After graphical.target.
    – Ingo
    May 1 '18 at 8:17
1

In my message there is a link to my original question, because someone pointed to me that it is crontab issue, that is why I ask here.

Anyway, I have found the answer.

Instead of using "sudo crontab -e"

I just have to use "crontab -e" (without sudo).

The crontab for a user pi runs after X. while crontab for sudo runs before it.

1
  • Nothing like a question you learn to answer yourself :)
    – Seamus
    May 3 '18 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.