# RunScheduledTask\[\] and ChoiceDialog\[\] Causes a Crash

**URL:** <https://community.wolfram.com/t/runscheduledtask-and-choicedialog-causes-a-crash/4143>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [November 27, 2014, 10:29am UTC](https://community.wolfram.com/t/runscheduledtask-and-choicedialog-causes-a-crash/4143 "2014-11-27T10:29:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/brad/32/498_2.png) [@brad](https://community.wolfram.com/u/brad)\
**Post date:** [November 27, 2014, 10:29am UTC](https://community.wolfram.com/t/runscheduledtask-and-choicedialog-causes-a-crash/4143/1 "2014-11-27T10:29:11Z")

</div>

If I run the following…

```
task = RunScheduledTask[MessageDialog["What do you want to do?"], 5]

```

…things seem to work fine.

But if I run…

```
task = RunScheduledTask[ChoiceDialog["What do you want to do?"], 5]

```

…Mathematica hangs, presumably because of something to do with MessageDialog[] not returning a value, whereas ChoiceDialog[] does.

Does anyone know of any way around this? I have tried wrapping ChoiceDialog[] in a function which itself returns nothing, then wrapping that in RunScheduledTask[].

But what I really want to achieve is to run a scheduled task that asks the user whether they want to do something or not, so I am stymied.
