LewTwo
LewTwo

Reputation: 93

Is there a python module for the Linux "at" task scheduler

Lest I reinvent the wheel .... again:

Is there a python interface, API or module for the standard linux "at" task scheduler? I have tried searching the internet but searching for the word "at" is a tad bit useless :-)

My intention is to have a python script process same data and construct a shell file. Then use a subprocess call to have "at" schedule the job file for a specific date and time. I will have a similar function using "Schtasks.exe" if python detects it is running on windows. Lastly the python script exits ... leaving system scheduler the responsibility of running the job file.

update 1 July 2019: Found an interesting "at" quirk. The file called on the "at" command line (i.e. the script or shell file) does not need to be marked as "executable" in order to be run by "at".

For the record: I am running Linux Mint 19.1

Upvotes: 4

Views: 213

Answers (1)

mdoflaz
mdoflaz

Reputation: 571

You can achieve this with different approach:

  • Write your python script.
  • Call this script with a bash file.
  • Schedule bash file with a crontab task.

Upvotes: 1

Related Questions