Automate a Daily Out-of-Office Tweet
Send an out-of-office message to Twitter while on vacation.
Create a function that will send a tweet.
In[1]:=
![Click for copyable input](assets.en/automate-a-daily-out-of-office-tweet/In_35.png)
awayTweet[] :=
ServiceConnect["Twitter"]["Tweet",
"Message" -> "No new tweets for today. I am away on vacation :)"]
Create a ScheduledTask to send the tweet daily for a week and then delete itself when complete.
In[2]:=
![Click for copyable input](assets.en/automate-a-daily-out-of-office-tweet/In_36.png)
task = CloudDeploy[
ScheduledTask[awayTweet[], {"Daily", 7}, AutoRemove -> True],
"AwayMessage"]
Execute the task to see what the results will look like.
In[3]:=
![Click for copyable input](assets.en/automate-a-daily-out-of-office-tweet/In_37.png)
EvaluateScheduledTask[task]
Out[3]=
![](assets.en/automate-a-daily-out-of-office-tweet/O_28.png)