# Autostart a program

**URL:** https://discourse.processing.org/t/autostart-a-program/24368
**Category:** Processing for Pi
**Created:** [October 5, 2020, 8:11pm UTC](https://discourse.processing.org/t/autostart-a-program/24368 "2020-10-05T20:11:25Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![KNealO96](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@KNealO96](https://discourse.processing.org/u/KNealO96)
#### Post date: [October 5, 2020, 8:11pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/1 "2020-10-05T20:11:25Z")

</div>

I would like to start a sketch automatically on startup. Is that possible?

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [October 6, 2020, 1:16am UTC](https://discourse.processing.org/t/autostart-a-program/24368/2 "2020-10-06T01:16:47Z")

</div>

you would have to look into automation in windows or whatever platform you are using. This is an os feature as opposed to a program feature, as its the os that decides what applications begin at startup.

see previous post

> [@How to run processing sketch automatic when my PC is Shuting Up](https://discourse.processing.org/t/how-to-run-processing-sketch-automatic-when-my-pc-is-shuting-up/12640/2):
>
> besides processing is a graphic app it also has a command line start [https://github.com/processing/processing/wiki/Command-Line](https://github.com/processing/processing/wiki/Command-Line) , also for both way to start processing, to do a autostart at boot might depend very much on the OS.

---

<div class="post-metadata">

### Author: ![Tomfoolery](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@Tomfoolery](https://discourse.processing.org/u/Tomfoolery)
#### Post date: [October 6, 2020, 5:49am UTC](https://discourse.processing.org/t/autostart-a-program/24368/3 "2020-10-06T05:49:28Z")

</div>

Yup!  
Export your application using the file menu.  
Create a shortcut to the executable.  
Go to Start \> Run \> Shell:startup (or “Shell:common startup” if you want the sketch to boot for all users)  
Copy the shortcut into the startup folder.  
Done!

---

<div class="post-metadata">

### Author: ![KNealO96](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@KNealO96](https://discourse.processing.org/u/KNealO96)
#### Post date: [October 6, 2020, 2:37pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/4 "2020-10-06T14:37:52Z")

</div>

O.K. Let me be a little more specific . . . I’m building a clock using Raspberry Pi’s. Since it’s a clock I want it to be a clock at all times. So I don’t want to have to go through manually having to start the clock because of any shutdown reason. I want it to start up as a clock all the time. RPi’s normally run Linux (Raspbian, a form of Linux) as the OS. Any good suggestions?

---

<div class="post-metadata">

### Author: ![KNealO96](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@KNealO96](https://discourse.processing.org/u/KNealO96)
#### Post date: [October 6, 2020, 2:40pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/5 "2020-10-06T14:40:11Z")

</div>

Also, this is a processing sketch, so processing must be started (I assume) and then clock.pde

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [October 6, 2020, 3:16pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/6 "2020-10-06T15:16:43Z")

</div>

Processing is just a wrapper for java, once the app is compiled processing is no longer required as your app is standalone

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [October 6, 2020, 6:11pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/7 "2020-10-06T18:11:53Z")

</div>

@KNealO96 most PCs have a cmos battery to keep clock going, not the RaspberryPI so your clock won’t keep going see [https://www.raspberrypi.org/forums/viewtopic.php?t=244216](https://www.raspberrypi.org/forums/viewtopic.php?t=244216)

---

<div class="post-metadata">

### Author: ![KNealO96](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@KNealO96](https://discourse.processing.org/u/KNealO96)
#### Post date: [October 6, 2020, 8:33pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/8 "2020-10-06T20:33:16Z")

</div>

Yes, thank you monkstone, but the real question is restarting the clock sketch automatically after any type of shutdown. The “clocking” will be taken care of within the .pde

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [October 6, 2020, 10:53pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/9 "2020-10-06T22:53:47Z")

</div>

> **[Teach, Learn, and Make with Raspberry Pi – Raspberry Pi](https://www.raspberrypi.org/documentation/linux/usage/cron.md)**

---

<div class="post-metadata">

### Author: ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)
#### Post date: [October 8, 2020, 8:31am UTC](https://discourse.processing.org/t/autostart-a-program/24368/10 "2020-10-08T08:31:31Z")

</div>

@KNealO96 have you seen this [https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=287334&p=1738121&hilit=humidity#p1738121](https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=287334&p=1738121&hilit=humidity#p1738121)

---

<div class="post-metadata">

### Author: ![KNealO96](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@KNealO96](https://discourse.processing.org/u/KNealO96)
#### Post date: [October 8, 2020, 10:26pm UTC](https://discourse.processing.org/t/autostart-a-program/24368/11 "2020-10-08T22:26:09Z")

</div>

Thanks Paul, I’ll look into this.
