October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Run Termux Scripts from Tasker—And What Overnight Automation Can’t Promise

Tasker can trigger Termux scripts through the Termux:Tasker plugin. Set up the script, grant command permission, choose background execution, and test the phone’s real screen-off behavior.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | 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.
  1. Open Termux and create the directory if it does not already exist: mkdir -p ~/.termux/tasker.

  2. 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.

  3. 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.

    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
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to | Prepaid Smartphone- 6.6" 120Hz Display, 5G , 50MP Quad Pixel Camera, Long-Lasting Battery
  • 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

  1. In Tasker, open the task you want to run and add an action.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Choose the plugin action for Termux:Tasker, then open its configuration.

    Rank #3
    Sale
    Samsung 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.
  3. Enter the executable name or path for the script in ~/.termux/tasker/, following the plugin’s configuration fields.

  4. Choose background execution for a scheduled command that does not need a visible terminal. This is the plugin’s default mode.

  5. 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.

    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
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black | Privacy Display, Galaxy AI, AI Camera, Super Fast Charging 3.0, Durable Battery, 2026, US 1 Year Warranty
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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
Tracfone Moto g Play 2024 Prepaid Phone with a 1-Yr Plan Included | Prepaid Smartphone with Full YR Plan Included bundled with 1500 Min/Text/Data for365 days of service - Locked to Tracfone
  • 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

  1. Run the script directly in Termux first, then invoke the Tasker action manually and inspect its result.

  2. 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.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. 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.

  4. 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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.