Go to advanced search

by pcmanbob
Wed Dec 07, 2016 4:46 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

... I think you may not be setting your cron job time correctly. so to run a job every minute you would use * * * * * python /home/pi/CronJobs/testPython.py & to run a job every 5 minutes you would use */5 * * ...
by dasmanul
Wed Dec 07, 2016 1:52 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

That's exactly the solution I had in mind. I don't see where the problem is, this should work.
by mickey_mouse
Wed Dec 07, 2016 1:50 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

... problem over again! I don't quite understand: If you're aware of the problem, it's easily fixed. I've been using the 'cd' (change directory) script command to move to the directory path the script's in. Maybe you have an alternate solution in mind?
by dasmanul
Wed Dec 07, 2016 1:30 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

mickey_mouse wrote:
rpdom wrote:I usually use the @reboot option in crontab. It works.
I had no success with this, it's the current working directory problem over again!
I don't quite understand: If you're aware of the problem, it's easily fixed.
by mickey_mouse
Wed Dec 07, 2016 1:17 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

rpdom wrote:I usually use the @reboot option in crontab. It works.
I had no success with this, it's the current working directory problem over again!
by elParaguayo
Wed Dec 07, 2016 9:27 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

... cron, it should certainly be running on your system. What makes you think it doesn't? What does your script do? I'm also a bit confused: Do you want to run it at startup or every 4 hours? Currently my script ...
by dasmanul
Wed Dec 07, 2016 8:34 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

... then actually installs it. Result of nano /etc/crontab: /1 * * * * root python /home/pi/CronJobs/testPython.py & You haven't specified where your script should put its output. Try redirecting output to a file and check whether the cronjob ...
by frankenberry
Wed Dec 07, 2016 2:53 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

rpdom wrote:I usually use the @reboot option in crontab. It works.
I have experimented with this as well, with no luck.
by frankenberry
Wed Dec 07, 2016 2:48 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

I'm running Jessie on a RPi1B. I would like to run a python script every 4 hours. Crontab seems ... reason or another. Requirements: At boot, run python script at startup in background. Thanks! just set ...
by frankenberry
Wed Dec 07, 2016 2:45 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

Python script (name testPython, and I have tested it and it runs): import datetime now = datetime.datetime.now() print(now.isoformat()) ...
by frankenberry
Wed Dec 07, 2016 2:39 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

... cron, it should certainly be running on your system. What makes you think it doesn't? What does your script do? I'm also a bit confused: Do you want to run it at startup or every 4 hours? Currently my script ...
by rpdom
Tue Dec 06, 2016 8:04 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

I usually use the @reboot option in crontab. It works.
by HombreSolaire
Tue Dec 06, 2016 5:40 pm
Forum: Troubleshooting
Topic: GPIO Server stops after reboot
Replies: 4
Views: 650

GPIO Server stops after reboot

... to work I need to activate "GPIO Server" in the raspi-config ... I see no possibility to run my python script at startup (etc/rc.local) I would very ...
by mickey_mouse
Tue Dec 06, 2016 5:22 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

... and never loading a GUI windows environment. Initially I'm using a Python script, as I haven't yet successfully ported C code that the project is written in. I've tried ...
by ArcherBoy27
Tue Dec 06, 2016 2:14 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

I'm running Jessie on a RPi1B. I would like to run a python script every 4 hours. Crontab seems ... reason or another. Requirements: At boot, run python script at startup in background. Thanks! just set ...
by pcmanbob
Tue Dec 06, 2016 1:14 pm
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

if you post your cron tab file we could see how you are calling your python program and check the cron entry .

post the result of this if you are running as the pi user

Code: Select all

crontab -e
of this if you are running as root

Code: Select all

sudo crontab -e
by dasmanul
Tue Dec 06, 2016 9:44 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Re: Run Python Script at Startup

If you haven't intentionally disabled cron, it should certainly be running on your system. What makes you think it doesn't?

What does your script do? I'm also a bit confused: Do you want to run it at startup or every 4 hours?
by frankenberry
Tue Dec 06, 2016 2:35 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 40
Views: 8597

Run Python Script at Startup

I'm running Jessie on a RPi1B. I would like to run a python script every 4 hours. Crontab seems ... reason or another. Requirements: At boot, run python script at startup in background. Thanks!
by marand2001
Thu Dec 01, 2016 6:43 pm
Forum: Automation, sensing and robotics
Topic: Running Script On Startup
Replies: 1
Views: 489

Running Script On Startup

... pi and set it up so that I can send myself emails. ... to use putty in college to run my raspberry headless but ... to do that. I created a script called ipdata.py and ... in /etc/rc.local I added python folowed by the full pathway ... The script does not run on startup at all though. Any tips? ...
by loop_1
Thu Dec 01, 2016 9:31 am
Forum: Troubleshooting
Topic: Execute python at startup
Replies: 4
Views: 890

Re: Execute python at startup

Thanks, now the script start automatically after startup!

...but i have another problem... after about 2 days the script functions aren't available... if i try a reboot, the python script run normally... for about 2 days....

there is any timer function that i ignore?
how i can verify the problem?
by gMan-87
Tue Nov 15, 2016 8:13 pm
Forum: Beginners
Topic: Audio passthrough with delay.
Replies: 4
Views: 1488

Re: Audio passthrough with delay.

thanks flatmax! I finally got around to ... to get that command to run at startup, I have a file called launcher.sh where I'm starting a python script.... #!/bin/sh #launcher.sh #navigate ...
by CarlRJ
Sun Nov 13, 2016 9:38 pm
Forum: General discussion
Topic: start script via bash = huge CPU drain
Replies: 14
Views: 3796

Re: start script via bash = huge CPU drain

... guess I'm confused about what this means). However, following ... root permissions as the python script will use GPIO. I do have ... is not for the root user (running the GUI with "sudo startx") ... want to modify root's X11 startup, you want to modify user ...
by plasticus
Sun Nov 13, 2016 2:02 pm
Forum: General discussion
Topic: start script via bash = huge CPU drain
Replies: 14
Views: 3796

Re: start script via bash = huge CPU drain

... you..I'm trying to decifrate your suggestions. The very ... earlier, says: Auto running applications in the ... root permissions as the python script will use GPIO. I do have ... started. it's included in my startup script. it's another software ...
by saulton7
Fri Nov 11, 2016 11:24 am
Forum: Python
Topic: Code for a Pi Zero Sound Player
Replies: 13
Views: 2913

Re: Code for a Pi Zero Sound Player

You could certainly have a script that plays a sound when it starts ... So what happens when you run it? What error messages do ... but it's not a python command so you'll need ... sort of works. I get the startup sound to play. and I can ...
by plasticus
Tue Nov 08, 2016 12:35 am
Forum: General discussion
Topic: start script via bash = huge CPU drain
Replies: 14
Views: 3796

Re: start script via bash = huge CPU drain

What happens if you disable dash and reboot? ... if you log in multiple times, it'll run multiple times. If you want to run these commands once, at startup, as root, add them to the end of ... 40812 25164 ? Rl 00:19 0:09 /usr/bin/python /usr/bin/idle /home/pi/python/Mindwave/test1.py ...

Go to advanced search