termux / termux/termux-api

Does termux-job-scheduler run the script immediately once called?

Open
#299 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

I start a Python script via termux-job-scheduler, using a --period-ms 901000 (just one second above the minimum).

It seems that sometimes the scheduled script runs the first time just after calling the termux-job-scheduler tool, other times the script runs the first time only after the first period is due.

I read the JobScheduler class documentation, but it is not clear what is the expected behaviour, someone has a clue? How can I help in writing termux-job-scheduler documentation?

The phone is running Android 6.0 with Termux:API 0.38 from F-Droid.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the JobScheduler class documentation and the termux-job-scheduler entry point, then trace the Android 6.0 behavior for the first invocation and the first scheduled period. Document whether an immediate run is expected and clarify the effect of --period-ms 901000; completion means the documented behavior matches the observed cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.