Schedule cron job to open Terminal and run command sequentially
<p>I scheduled a cron job on a Mac to open Terminal every day at 11PM as follows:</p>

<pre><code>0 23 * * * open -a Terminal
</code></pre>

<p>That works great! But what I would like is to not only open Terminal, but also to run a simple command within it. From looking online, <a href="https://help.ubuntu.com/community/CronHowto" rel="noreferrer">it looks as if cron commands can be chained with <code>&amp;&amp;</code></a>:</p>

<pre><code>0 23 * * * open -a Terminal &amp;&amp; echo 'Hello, world!'
</code></pre>

<p>However, this modified cron job only opens Terminal without running the second command there. <strong>Any thoughts on how I can get the cron job to do both?</strong></p>