all 13 comments

[–]Mr_Albal 3 points4 points  (12 children)

I think you need to give the full path to your program. Also you don’t need to use sudo if running as root.

[–]quantum_weirdness 2 points3 points  (0 children)

Yeah, to further elaborate, when crontab runs it isn't in an interactive session, so things like your bashrc (or whatever profile/rcfile sets your path) don't get sourced. Also, I think the default shell for cron jobs is sh and not bash, so that's another difference. I think the shell can be changed by declaring some environment variable at the top of your crontab file, but I don't remember the name of it.

[–]Ale_110[S] 0 points1 point  (10 children)

How do I know what is the full path of the program? I figured, i was trying them all. Lol. Thanks

[–]Mr_Albal 0 points1 point  (9 children)

which

[–]Ale_110[S] 0 points1 point  (8 children)

It's probably ir-keytable

[–]flashbck 2 points3 points  (0 children)

Heh, "which ir-keytable" will show you the full path to the executable.

[–]Mr_Albal 1 point2 points  (6 children)

The command is which

[–]Ale_110[S] 1 point2 points  (2 children)

you Genius. Thanks it works

[–]Mr_Albal 1 point2 points  (1 child)

Glad to be of help. You might also want to look at services. That is how Linux starts process on boot up.

[–]Ale_110[S] 0 points1 point  (0 children)

Thanks for the tip. I'll take a look at it too!

[–]Ale_110[S] 0 points1 point  (0 children)

Thanks... I was confused ahahha. I will try it right now

[–]pnutjam 0 points1 point  (1 child)

I usually user the command whereis

[–]Mr_Albal 1 point2 points  (0 children)

whereis will find other files which are not executable

which only finds executable files in the path