cPanel Cron API - linekey while removing

Jan 9, 2018
18
2
3
.
cPanel Access Level
Root Administrator
Hello,

I ran into problems with removing cron with API 2. The add_line returns key named keyline while remove_line needs the count number for cron which is not given in the response of add_line.

Possible workout I've found is using fetchcron and looping through it for that specific keyline. Is there any direct way?
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

The Cron::remove_line cPanel API 2 function does not support entering a linekey obtained when adding the cron job. Instead, it only supports the use of a line number. You could also manually edit the crontab file via the "crontab -e" command to remove a line, or by directly editing the /var/spool/cron/$username file.

Thank you.