If this is a GUI only program you need to start your program after the GUI is up, I don't see this check in your crontab file Been too long since i have done this but i am sure google is your friend
On 4/16/2016 4:53 PM, John Baker wrote: > Hi Dieter, > Still not working. I have a hunch that the problem is with Tkinter but > can't tell. I have to run my GUI program SimB.py with the terminal > program on the BBB, typing sudo python SimB.py, then it runs happily. > > *Here's my crontab in /etc:* > # /etc/crontab: system-wide crontab > # Unlike any other crontab you don't have to run the `crontab' > # command to install the new version when you edit this file > # and files in /etc/cron.d. These files also have username fields, > # that none of the other crontabs do. > > SHELL=/bin/sh > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > > # m h dom mon dow usercommand > 17 ** * *root cd / && run-parts --report /etc/cron.hourly > 25 6* * *roottest -x /usr/sbin/anacron || ( cd / && run-parts --report > /etc/cron.daily ) > 47 6* * 7roottest -x /usr/sbin/anacron || ( cd / && run-parts --report > /etc/cron.weekly ) > 52 61 * *roottest -x /usr/sbin/anacron || ( cd / && run-parts --report > /etc/cron.monthly ) > # > @reboot root /usr/bin/python /home/debian/Desktop/SimB.py > * * * * * root /usr/bin/python /home/debian/Desktop/SimB.py > > *and here's from the syslog file that doesn't tell me anything:* > > Apr 16 23:37:01 beaglebone /USR/SBIN/CRON[2293]: (root) CMD (sudo > python /home/debian/Desktop/SimB.py) > > Apr 16 23:37:01 beaglebone /USR/SBIN/CRON[2294]: (debian) CMD (sudo > python /home/debian/Desktop/SimB.py) > > Apr 16 23:37:01 beaglebone /USR/SBIN/CRON[2295]: (root) CMD > (/usr/bin/python /home/debian/Desktop/SimB.py) > > Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2292]: (CRON) info (No MTA > installed, discarding output) > > Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2290]: (CRON) info (No MTA > installed, discarding output) > > Apr 16 23:37:14 beaglebone /USR/SBIN/CRON[2291]: (CRON) info (No MTA > installed, discarding output) > > > I can successfully run my program with a keyboard attached to my BBB > using sudo python SimB.py, have to use the sudo, otherwise gets a > Tkinter error. I just now double-checked and my GUI program SimB.py > runs very happily. Cannot run SimB.py thru putty as it gives the > Tkinter error. > > Any ideas? > Thanks, > John > > On Saturday, April 16, 2016 at 1:04:21 AM UTC-7, Dieter Wirz wrote: > > On Sat, Apr 16, 2016 at 5:57 AM, John Baker > <[email protected] <javascript:>>wrote: > > John Minton, > I gave crontab a try and of course it didn't work. It seems > like this should be a piece of cake to do. I probably did > something wrong. I checked the syslog and see an error: "No > MTA installed." > > > > If u > > have an error in crontab the crontab tries to send you an > Email... And of coarse cannot without MTA;) > > My crontab file says: > > @reboot sudo python /home/debian/Desktop/myProg.py > * * * * * sudo python /home/debian/Desktop/myProg.py > > > The are two crontabs, users and system crontab. > Users crontab you can change with > $ crontab -e > System crontab with > $ sudo nano /etc/crontab > > If u want to run a process as root, then best is, if u add > > @reboot root /usr/bin/python /home/debian/Desktop/myProg.py > * * * * * root /usr/bin/python /home/debian/Desktop/myProg.py > > to /etc/crontab > > HTH > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google > Groups "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/ad44be62-e803-43e8-b131-131d16fd92f9%40googlegroups.com > <https://groups.google.com/d/msgid/beagleboard/ad44be62-e803-43e8-b131-131d16fd92f9%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5712DAA5.7040007%40gmail.com. For more options, visit https://groups.google.com/d/optout.
