Thanks Federico, I saw and read that before but that is not my problem. Maybe I missed something, but isn't the YUN supposed to work independently (without a connection to a computer)?
Yes it is and yes, it does. Unless...
Because my sketch is only working when connected to a computer/mac via USB Port. I don't necessarily have to monitor it via serial monitor but I can see that the sketch is not executed when it doesn't send mails or adding Data to a Google Spreadsheet or whatever the sketch is supposed to do.
Thanks for your patience with a novice
I think what Frederico was try to point you at is that with a Yun not connected to a PC, you need to monitor any debugging output via the console (connected over whatever Ethernet connection you have to your Yun, wireless or wired).
And the fact that you say that the sketch is working when connected via serial (USB) connection and seems not to work when this connection doesn't exist, this points to the possibility that you have some code in either the setup() or (start of) the loop() function that waits for a serial connection, as it is common for Arduino sample scripts, something like
while(!Serial.available());
which of course will wait forever (and subsequently not execute your sketch as expected) if there isn't a serial/USB connection to your Yun...
Ralf