# TEE on solana X Switchboard ### How do switchboard Tee works? Switchboard allows you to make functions and run them off-chain , enabling the submission of transactions either based on a predetermined cron schedule or as needed. ![](https://hackmd.io/_uploads/Hk1CfAsTn.png) ### Steps 1. Define switchboard in the contract 2. Write custom Function 3. Build container and upload to Docker/IPFS registry 4. Create an on-chain FunctionAccount at https://app.switchboard.xyz/build/function by adding the ipfs link > Functions can set a cron schedule to have it executed periodically. This is useful for automating tasks on-chain with custom conditional logic. # Demo Im using the switchboard template here -> ![](https://hackmd.io/_uploads/HygOlwh6h.png) > Be sure to check out the [makefile](https://github.com/switchboard-xyz/solana-functions-template/blob/main/Makefile) After it Has complied, publish it on docker or ipfs ~~~ make publish ~~~ Now take the docker identifier and head to Switchboard [function builder](https://app.switchboard.xyz/build/function), and fill in rest of the details! Woala, we just executed our special code in this case a randomness generator in a secure encalve which swithcboard posts on chain with cryptographic proofs ![](https://hackmd.io/_uploads/ByjdWv3ah.png)
{"title":"TEE on solana X Switchboard","description":"How do switchboard tee works?","contributors":"[{\"id\":\"c289b46a-4b88-4d77-af66-e2a0363e920a\",\"add\":1432,\"del\":115}]"}
Expand menu