To run a Termux script from Tasker, install the Termux:Tasker plugin, grant Tasker Termux’s RUN_COMMAND permission, and configure a Tasker plugin action to run an executable in ~/.termux/tasker/. Background mode is the usual choice for scheduled work. It lets Tasker run a command and, if configured to wait, receive its output and exit result—but it does not guarantee that Android will keep every long-running task alive all night.
How Tasker connects to Termux
Tasker does not directly turn a task into a Linux process. A Tasker profile triggers a Tasker action; the Termux:Tasker plugin action then asks Termux to run a selected executable in Termux’s environment. The plugin supports running scripts from Termux, with background execution as the default and a new terminal session as an alternative. See the Termux:Tasker project documentation and its F-Droid listing.
As an Amazon Associate I earn from qualifying purchases.
The distinction matters: a Tasker action being triggered is not the same as the command finishing successfully, and neither fact alone proves the phone will keep a long-running process running unattended. Android restrictions, permissions, the action timeout, and device-specific power management all affect reliability.
Prepare a script in Termux
Use Termux’s private home directory for the first setup. The plugin’s recommended script directory is ~/.termux/tasker/; scripts there need to be readable and executable for the plugin to find and run them. The plugin sets execute permissions for files in that directory when its action runs, according to the project README.
#1 Best Overall
- YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
- LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
- MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
- NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
- BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
-
Open Termux and create the directory if it does not already exist:
mkdir -p ~/.termux/tasker. -
Create a small script there, for example
nightly-check.sh. Keep the script’s contents specific to a task you understand and intend to run. -
Run the script directly in Termux and confirm it behaves as expected before adding Tasker. Fix any missing commands, paths, or permissions at this stage.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
A script stored elsewhere requires an absolute path and the Termux setting allow-external-apps=true. This expands what an app with command permission can run, so it is not a routine fix for a path typo. Termux warns against enabling it when a relatively untrusted app has RUN_COMMAND access. Keep automation scripts in the recommended private directory unless you have a specific reason to use an external path.
Rank #2
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
- DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
- CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
- PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
- BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.
Grant Tasker permission to run Termux commands
For Termux:Tasker version 0.5 and later, the app hosting the plugin action must have Termux’s com.termux.permission.RUN_COMMAND permission. The maintainers say Tasker has requested this permission since Tasker 5.9.3. Their documented Android route is to open system app settings for Tasker and grant the Termux command permission; exact Settings labels can vary by Android version and device. Consult the Termux:Tasker README if the permission is not apparent.
Termux’s RUN_COMMAND documentation explains the underlying permission model: third-party apps can run commands in Termux’s context through the command service or as a plugin host, but the host app needs the required permission. The wiki records historical platform context, so use the current settings on your phone rather than assuming every Android release presents the same screens.
Configure the Tasker plugin action
-
In Tasker, open the task you want to run and add an action.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Choose the plugin action for Termux:Tasker, then open its configuration.
Rank #3
SaleSamsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025- YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
- LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
- MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
- NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
- BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
-
Enter the executable name or path for the script in
~/.termux/tasker/, following the plugin’s configuration fields. -
Choose background execution for a scheduled command that does not need a visible terminal. This is the plugin’s default mode.
-
If later Tasker actions depend on the command’s result, configure the action to wait for the result and set a timeout appropriate to the expected runtime.
Recommended Free Tools
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
The plugin supports returning background command stdout, stderr, and an exit result when Tasker waits for the result. That lets you inspect whether the command itself succeeded rather than treating the action’s trigger as proof of success. The README describes a 10-second default action timeout and advises increasing it for longer background commands. If the command runs past the timeout, result variables may not be returned.
Rank #4
- PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
- TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
- NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
- MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
- HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone
Choose background mode or a terminal session
| Question | Background execution | New terminal session |
|---|---|---|
| Is a visible terminal needed? | No; this is the documented default for the plugin action. | Yes; Termux opens a terminal session for the command. |
| What output does Tasker receive? | When the action waits for the result, separate stdout, stderr, and an exit result are available. |
A combined terminal transcript, rather than separate standard output and error streams. |
| Can Android interfere with launch? | The documented Android 10-and-later foreground-activity restriction does not apply to background commands. | Android 10 and later may restrict launching the terminal activity from the background; the user may need to tap the Termux notification. The documentation describes Draw Over Apps permission as an optional way to allow automatic start. |
| What should guide the choice? | Use it for scheduled work that can run without a visible session; set a suitable wait and timeout if Tasker needs the result. | Use it when the visible terminal session itself is useful, and account for activity-start restrictions. |
These differences are described in the Termux:Tasker documentation and the RUN_COMMAND wiki. A visible session is not automatically a better choice for overnight automation: it introduces a foreground-activity launch issue on newer Android versions.
Check results instead of assuming success
When waiting for a background result, inspect the exit result and error output in Tasker. The command’s exit result reflects the script’s completion status; an action that ran without an obvious Tasker error can still have launched a script that failed internally. Tasker versions may expose a missing permission failure differently in %err and %errmsg, according to the plugin README.
Keep output modest if Tasker needs to capture it. The README says combined stdout and stderr are truncated at 100 KB. For a task that produces extensive output, have the script write its own log to an appropriate Termux path and return a concise status instead of relying on a complete transcript in Tasker.
Account for storage and Android background limits
Shared storage paths
A script in Termux’s private home directory is different from a command that reads or writes shared storage. If your script uses paths such as /sdcard or /storage/emulated/0, Termux may need storage access and the path must be accessible. This is separate from the plugin’s script-directory setup; see the RUN_COMMAND documentation.
Best Value
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
- ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
- CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
- PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
- 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US
Long-running work
Increasing Tasker’s action timeout gives a background command more time before the plugin stops waiting, but it is not a persistence guarantee. The Termux:Tasker README warns that Android may kill the plugin host during long runs even when the timeout has been increased. Whether a task completes with the screen off depends on Android’s background behavior and the phone’s own power-management policies; the official documentation does not guarantee identical overnight behavior across manufacturers or devices.
Test the exact scheduled run
-
Run the script directly in Termux first, then invoke the Tasker action manually and inspect its result.
-
Test the profile at its intended scheduled time and for its intended duration, including with the screen off if that is how it will run in practice.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
If it fails, check Tasker’s Termux permission, the configured executable path and directory permissions, the command’s exit result and errors, and whether the timeout is shorter than the work.
-
If the script uses shared storage, verify Termux storage permission and the exact path. If it uses a terminal session, check whether Android is waiting for you to tap the Termux notification.
F-Droid’s listing showed Termux:Tasker version 0.9.0 added on September 5, 2025, with Android 5.0 or newer listed as a requirement at that time; release details may change. Check the current listing and project documentation for the version you install.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




